• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ICRAR / ijson / 298
100%

Build:
DEFAULT BRANCH: master
Ran 16 Mar 2022 01:58AM UTC
Jobs 11
Files 74
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
298

push

travis-ci-com

rtobar
Avoid decref'ing the sink argument

In #34 memory leaks were reported on the yajl2_c backend that happened
at generator construction time. After investigation, we discovered one
of these in the "chain" utility method, which leaked the temporary
coroutines it chained together. The fix in a8159e4 (first present in
3.1.2) attempted to fix this particular problem, along with the rest of
the identified memory leaks.

The fix for the "chain" method was not correct though: the condition we
used to identify whether the internal "coro" variable had to be decref'd
was incorrect, and led to our code incorrect decref'ing the "sink"
parameter given by the caller, which was meant to be left untouched.
This opened the door to potential issues when the caller decref'd its
reference to "sink".

The problem was not immediately obvious, as depending on the program's
activity, memory allocator and other factors, the memory used by the
destroyed "sink" object could still be valid. In fact our unit tests
never caught this error, and this problem was only reported to us about
a year after 3.1.2 was released by users who saw this problem only after
creating and destroying ijson.parser objects thousands of times.

To reproduce this issue locally I wrote a small script that created a
list of N ijson.parser generators, and then depleted them in order. Only
when running with N=10k I was able to get a failure every 2 or 3
executions.  After applying this patch I saw no failures, so I'm fairly
confident the issue is gone.

This problem was reported originally in #66, which this commit should
fix.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>

1 of 1 new or added line in 1 file covered. (100.0%)

1515 of 1518 relevant lines covered (99.8%)

420.67 hits per line

Jobs
ID Job ID Ran Files Coverage
1 298.1 (CIBW_SKIP="cp27-win*" CIBW_TEST_REQUIRES=pytest cffi= CIBW_BEFORE_ALL="bash -c 'cmake --help || yum install -y cmake; cd \"{project}\"; sh .github/tools/install_yajl.sh'" CIBW_TEST_COMMAND="bash -c 'cd \"{project}\"; pytest -vv'" CIBW_ENVIRONMENT_WINDOWS="IJSON_EMBED_YAJL=1" TWINE_USERNAME=__token__ YAJL_VERSION=1.0.12) 16 Mar 2022 01:58AM UTC 0
78.0
Travis Job 298.1
2 298.2 (CIBW_SKIP="cp27-win*" CIBW_TEST_REQUIRES=pytest cffi= CIBW_BEFORE_ALL="bash -c 'cmake --help || yum install -y cmake; cd \"{project}\"; sh .github/tools/install_yajl.sh'" CIBW_TEST_COMMAND="bash -c 'cd \"{project}\"; pytest -vv'" CIBW_ENVIRONMENT_WINDOWS="IJSON_EMBED_YAJL=1" TWINE_USERNAME=__token__) 16 Mar 2022 01:58AM UTC 0
92.35
Travis Job 298.2
3 298.3 (CIBW_SKIP="cp27-win*" CIBW_TEST_REQUIRES=pytest cffi= CIBW_BEFORE_ALL="bash -c 'cmake --help || yum install -y cmake; cd \"{project}\"; sh .github/tools/install_yajl.sh'" CIBW_TEST_COMMAND="bash -c 'cd \"{project}\"; pytest -vv'" CIBW_ENVIRONMENT_WINDOWS="IJSON_EMBED_YAJL=1" TWINE_USERNAME=__token__ YAJL_VERSION=1.0.9) 16 Mar 2022 01:59AM UTC 0
78.12
Travis Job 298.3
4 298.4 (CIBW_SKIP="cp27-win*" CIBW_TEST_REQUIRES=pytest cffi= CIBW_BEFORE_ALL="bash -c 'cmake --help || yum install -y cmake; cd \"{project}\"; sh .github/tools/install_yajl.sh'" CIBW_TEST_COMMAND="bash -c 'cd \"{project}\"; pytest -vv'" CIBW_ENVIRONMENT_WINDOWS="IJSON_EMBED_YAJL=1" TWINE_USERNAME=__token__) 16 Mar 2022 01:59AM UTC 0
92.12
Travis Job 298.4
5 298.5 (CIBW_SKIP="cp27-win*" CIBW_TEST_REQUIRES=pytest cffi= CIBW_BEFORE_ALL="bash -c 'cmake --help || yum install -y cmake; cd \"{project}\"; sh .github/tools/install_yajl.sh'" CIBW_TEST_COMMAND="bash -c 'cd \"{project}\"; pytest -vv'" CIBW_ENVIRONMENT_WINDOWS="IJSON_EMBED_YAJL=1" TWINE_USERNAME=__token__ UPLOAD_C_COVERAGE=yes) 16 Mar 2022 01:59AM UTC 0
99.68
Travis Job 298.5
6 298.6 (CIBW_SKIP="cp27-win*" CIBW_TEST_REQUIRES=pytest cffi= CIBW_BEFORE_ALL="bash -c 'cmake --help || yum install -y cmake; cd \"{project}\"; sh .github/tools/install_yajl.sh'" CIBW_TEST_COMMAND="bash -c 'cd \"{project}\"; pytest -vv'" CIBW_ENVIRONMENT_WINDOWS="IJSON_EMBED_YAJL=1" TWINE_USERNAME=__token__ YAJL_VERSION=cant_find_it) 16 Mar 2022 01:59AM UTC 0
74.72
Travis Job 298.6
7 298.7 (CIBW_SKIP="cp27-win*" CIBW_TEST_REQUIRES=pytest cffi= CIBW_BEFORE_ALL="bash -c 'cmake --help || yum install -y cmake; cd \"{project}\"; sh .github/tools/install_yajl.sh'" CIBW_TEST_COMMAND="bash -c 'cd \"{project}\"; pytest -vv'" CIBW_ENVIRONMENT_WINDOWS="IJSON_EMBED_YAJL=1" TWINE_USERNAME=__token__) 16 Mar 2022 01:58AM UTC 0
95.03
Travis Job 298.7
8 298.8 (CIBW_SKIP="cp27-win*" CIBW_TEST_REQUIRES=pytest cffi= CIBW_BEFORE_ALL="bash -c 'cmake --help || yum install -y cmake; cd \"{project}\"; sh .github/tools/install_yajl.sh'" CIBW_TEST_COMMAND="bash -c 'cd \"{project}\"; pytest -vv'" CIBW_ENVIRONMENT_WINDOWS="IJSON_EMBED_YAJL=1" TWINE_USERNAME=__token__) 16 Mar 2022 01:58AM UTC 0
95.03
Travis Job 298.8
9 298.9 (CIBW_SKIP="cp27-win*" CIBW_TEST_REQUIRES=pytest cffi= CIBW_BEFORE_ALL="bash -c 'cmake --help || yum install -y cmake; cd \"{project}\"; sh .github/tools/install_yajl.sh'" CIBW_TEST_COMMAND="bash -c 'cd \"{project}\"; pytest -vv'" CIBW_ENVIRONMENT_WINDOWS="IJSON_EMBED_YAJL=1" TWINE_USERNAME=__token__ YAJL_VERSION=none) 16 Mar 2022 01:58AM UTC 0
74.39
Travis Job 298.9
10 298.10 (CIBW_SKIP="cp27-win*" CIBW_TEST_REQUIRES=pytest cffi= CIBW_BEFORE_ALL="bash -c 'cmake --help || yum install -y cmake; cd \"{project}\"; sh .github/tools/install_yajl.sh'" CIBW_TEST_COMMAND="bash -c 'cd \"{project}\"; pytest -vv'" CIBW_ENVIRONMENT_WINDOWS="IJSON_EMBED_YAJL=1" TWINE_USERNAME=__token__) 16 Mar 2022 01:59AM UTC 0
95.19
Travis Job 298.10
11 298.11 (CIBW_SKIP="cp27-win*" CIBW_TEST_REQUIRES=pytest cffi= CIBW_BEFORE_ALL="bash -c 'cmake --help || yum install -y cmake; cd \"{project}\"; sh .github/tools/install_yajl.sh'" CIBW_TEST_COMMAND="bash -c 'cd \"{project}\"; pytest -vv'" CIBW_ENVIRONMENT_WINDOWS="IJSON_EMBED_YAJL=1" TWINE_USERNAME=__token__) 16 Mar 2022 01:59AM UTC 0
95.19
Travis Job 298.11
Source Files on build 298
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #298
  • c5229082 on github
  • Prev Build on master (#297)
  • Next Build on master (#300)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc