| Summary: | memory. double free or corrupted. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Sakura <sakura.ix86> |
| Component: | render | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sylvain.becker |
| Version: | 2.0.4 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | source code of my jpeg decoder with sdl2 | ||
I think this can be closed ... valgrind reports an issue in your code, when decoding the 5in.jpg: malloc(3584) 0xa181c90 malloc(3584) 0xa182ae0 malloc(3584) 0xa183930 ==14966== Invalid write of size 1 ==14966== at 0x109AE3: funcYCbCrToRGB (jpegStream.c:249) ==14966== by 0x10AEDF: jsycbcrtorgb (jpegStream.c:664) ==14966== by 0x10B6A0: main (main.c:110) ==14966== Address 0xa182a9a is 0 bytes after a block of size 3,594 alloc'd ==14966== at 0x4C2CB3F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==14966== by 0x108E5C: my_malloc (common.c:13) ==14966== by 0x10AE0D: jsycbcrtorgb (jpegStream.c:655) ==14966== by 0x10B6A0: main (main.c:110) Sylvain, thanks for investigating. Sakura, please reopen this bug if your code runs cleanly under valgrind and you're still seeing this problem. |
Created attachment 2584 [details] source code of my jpeg decoder with sdl2 If i include sdl into my jpeg decoder, some jpg's can not draw. gcc *.c -lpthread -lm -I/usr/local/lib/ -lSDL2 ./a.out 5in.jpg