Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segfault and build error on Linux #26

Merged
merged 2 commits into from
Jun 27, 2014

Conversation

pah
Copy link
Contributor

@pah pah commented Jun 27, 2014

The removal of setjmp/longjmp in #22 has introduced a segfault on Linux platforms, as shown on Travis CI.

These crashes have been caused by missing early returns after ParseStringToStream. Additionally, an early return has been added after the ParseArray/ParseObject in the top-level code by jumping to the cleanup part directly.

Last, but not least, constness has been casted away in my CopyFrom function (see #22).

pah added 2 commits June 27, 2014 10:26
Some early returns were missing after the removal of longjmp in Tencent#22.
This has led to segfaults on Linux (confirmed locally).
Another instance of casting away constness via C-style cast
has been missed (introduced by Tencent#20).
miloyip added a commit that referenced this pull request Jun 27, 2014
Fix segfault and build error on Linux
@miloyip miloyip merged commit b2b12a6 into Tencent:master Jun 27, 2014
@pah pah deleted the fixes/errorreturn-castqual branch June 27, 2014 13:19
@miloyip
Copy link
Collaborator

miloyip commented Jun 27, 2014

Thanks. I was wondering how to inspect that crash, as I cannot reproduce it on Windows.
At least it shows that Travis CI is working properly :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants