Description of problem: ilSaveF() dies while writing last block of image to file. Program received signal SIGSEGV, Segmentation fault. 0x000000366ee61761 in _IO_seekoff_unlocked () from /lib64/libc.so.6 (gdb) where #0 0x000000366ee61761 in _IO_seekoff_unlocked () from /lib64/libc.so.6 #1 0x000000366ee60425 in ftell () from /lib64/libc.so.6 #2 0x00002aaaaaaf918b in iDefaultRTell (Handle=0x606280) at il_files.c:162 #3 0x00002aaaaaaf9f33 in iTellRFile () at il_files.c:570 #4 0x00002aaaaab1a139 in ilSaveF (Type=1061, File=0x606260) at il_io.c:1358 #5 0x0000000000400a5a in main (argc=1, argv=0x7fff61ff4398) at bug.c:29 (gdb) Version-Release number of selected component (if applicable): DevIL-1.6.8-0.12.rc2.fc8.x86_64 How reproducible: 100% Steps to Reproduce: 1. gcc -Wall -g -O0 -lIL -lILU bug.c -o bug 2. gdb ./bug 3. run test.png << any test image Actual results: A truncated bug.jpg is produced, the executable dies with a SIGSEGV Expected results: working output to file handles. Additional info:
Created attachment 161927 [details] small test program
Ok I've confirmed the bug on i386 and ppc also. I'll report the bug upstream and start looking at a fix myself.
I've added a patch which hopefully fixes the problem. bug.c now works as expected when compiled on i386 with the updated DevIL libs and should work on other archs too. The update has been built and will be appearing in the repositories shortly. Please verify the fix and re-open this bug if neccessary.
DevIL-1.6.8-0.13.rc2.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.