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

precomp segfaults for this file. #59

Closed
dElogics opened this issue May 7, 2017 · 7 comments
Closed

precomp segfaults for this file. #59

dElogics opened this issue May 7, 2017 · 7 comments
Assignees

Comments

@dElogics
Copy link

dElogics commented May 7, 2017

pre compressing this file --
precomp_segfault.zip
with command line --

-cn -oprecomp_tar

segfaults precomp on LInux 64

I tried to get the BT, but the debugging symbols where not there in the binary version and the one that I built from git. I tried changing the CFLAGS and added -ggdb, but the debugging symbols still got stripped. On changing the optimization levels to -O0 for all libraries, solved the problem but of course it's a bad solution.

@dElogics
Copy link
Author

dElogics commented May 7, 2017

It's giflib. Disabling it completes the precomp.

@sftt
Copy link
Contributor

sftt commented May 11, 2017

try on Win7 64bit.

  • precomp_segfault.zip : no fault & no gain
  • -intense precomp_segfault.zip : no fault & no gain
  • precomp_segfault.tar(extracted from the zip) : no fault
  • -intense precomp_segfault.tar : fault on 59.82%
  • -v -intense precomp_segfault.tar : no fault, suggest -zl18,68,69,82,95 -d0
  • -intense -d0 precomp_segfault.tar : no fault
  • -intense -d10 precomp_segfault.tar : no fault
  • -intense -zl18,68,69,82,95 precomp_segfault.tar : fault on 59.82%

@schnaader
Copy link
Owner

Regression from 0.4.5 (where everything works according to a quick test), one of the culprits is a GIF stream at position 1260117 (60.09%), but there seem to be other problems, as the following gives no segfault on my machine (Win7 64bit, Precomp 0.4.6 commit d9f61c6):

precomp -cn -intense -zl18,68,69,82,95 -v -i1254601 -i1244353 -i1237086 -i1162009 -i1146093 -i1138392 precomp_segfault.tar

(it basically ignores several streams before the GIF stream, but not the GIF stream itself)

OTOH, undefined behaviour leads to undefined behaviour, so you never know...

@schnaader schnaader self-assigned this May 15, 2017
@schnaader schnaader added this to the Precomp v0.4.6 milestone May 15, 2017
@dElogics
Copy link
Author

Mine is a Linux machine.

@dElogics
Copy link
Author

Segfaults 4.5 also.

@schnaader schnaader changed the title precomp (git commit d9f61c65d663d0aa03bd60d776ea06e40f07b1fa and 0.4.5) segfaults for this file. precomp segfaults for this file. Jun 7, 2017
@schnaader
Copy link
Owner

schnaader commented Jun 7, 2017

Debugging with Visual Studio worked good. This way, the error could be isolated to testing a small GIF file (see attachment). The image is 1x1 pixel, but has no colormap, so that the function EGifPutImageDesc returns an error code - this code was unhandled and led to accessing uninitialized memory.

segfault.gif

schnaader added a commit that referenced this issue Jun 7, 2017
- Unhandled GIF_ERROR led to accessing uninitialized memory
@dElogics
Copy link
Author

Thanks.

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

No branches or pull requests

3 participants