Strange thing is that philmoz specially said that the gcc4 compiler barfed without his changes. Making a buffer bigger never hurts but you would not think it would be compiler specific.
Perfectly illustrates why CHDK-Shell defaults to keeping dowloaded archives ...
If it is too small (and I wouldn't enlarge it without verifying) then it wouldn't be a surprise at all if it changed depending on the compiler, because what got overwritten would depend on what the compiler happened to put near it. Changing the initialization would also have the same effect.
Here's a patch to test size issue. It displays the 16 bytes after the normal 40 byte de in misc debug vals. Before readdir has been used, it should be zeros. After it has been used it should all be 0xdededede. If dirent is bigger, it should be something else...
Quote from: reyalp on 23 / April / 2011, 18:00:13Here's a patch to test size issue. It displays the 16 bytes after the normal 40 byte de in misc debug vals. Before readdir has been used, it should be zeros. After it has been used it should all be 0xdededede. If dirent is bigger, it should be something else...Made the change, loaded and shot a couple of pix. The debug stayed at 00000000. Fired up the menu, went to file browser and all four lines of the debug read dededede afterwards.Pretty much what you were expecting.
Well if they all stayed de, then it looks like dirent hasn't gotten bigger than 40 bytes, which leaves us without a cause for the crash. Possibly it expects it to be initialized to zeros I guess.
Started by Lebeau General Discussion and Assistance
Started by falstaff « 1 2 » General Discussion and Assistance
Started by stoemp General Discussion and Assistance
Started by Microfunguy « 1 2 3 » General Discussion and Assistance
Started by philmoz « 1 2 » General Discussion and Assistance