Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
jpeg plugin crashes in Win64 #119
My 1st finding is that crashes allways occur in setjump().
setjump() is used in primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgrWriteScanlines as the return point for the error_exit() - called by jpeg library in case of error.
error_exit() will then use longjmp to go to the exit point.
But the call to setjump does not allways crash. It sometimes succeed, sometimes crash.
My 2nd finding is that it works when the jump_buf is 16-bytes aligned (hex address ending by 0), but fails when 8 bytes-aligned (hex address ending by 8).
This seems confirmed by other bug reports (google: setjmp win64 failure 16bytes aligned)
A workaround would be to store a pointer to the jump_buf in struct error_mgr2, and properly align the jump_buf with alloca() or something...