crash in command.c
This changeset 7241446bd7e34ea0ca381341aeebfbeec99f222b broke jam for me. In my project I get a jam crash.
The crash happens in command.c on line 257.
expandedsubbufsize is -1 at this point, because apparently the previous cmd_string() call failed.
The result from that call is not checked, and fed into tmp_write, followed by an unhandled exception shortly after.
I haven't figured out why -1 got returned in the first place, but a check on the cmd_string return value is in place.
#1 Updated by Lucas Meijer almost 11 years ago
when patching jamplus to properly deal with the -1 returncode from cmd_string (which happened because the cmd_string length > 10240), jam stops crashing, and instead nicely reports "Link actions too long (max 1024)!"
which is a bit annoying, but not jam's fault :)
#2 Updated by Joshua Jensen almost 11 years ago
There is no maximum command line size when dealing with response files. This appears to be a bad copy/paste.
expandedsubbuffsize = cmd_string(rule, buffer_ptr(&subbuff), &expandedsubbuff, outsize, lol, response_files, cmd);
expandedsubbuffsize = cmd_string(rule, buffer_ptr(&subbuff), &expandedsubbuff, INT_MAX, lol, response_files, cmd);
Let me know how that works for you.