Chet Ramey a écrit : > Marc Herbert wrote: >> The following script crashes bash versions 2.05, 3.2.25, 4.0.16,... >> >> >> trap "echo USR1caught" USR1 >> read -t 1 >> foo=$( kill -USR1 $$ ) >> echo 'Yeah! no Segmentation fault!' > > Thanks for the report.
Thanks for bash in the first place. > Fixed in the next version. Chet, is there any workaround for existing versions? I mean, there must be some memory corruption involved in here, so is it possible to dodge it without upgrading? For instance, would simply avoiding the "-t" option of "read" be enough to guarantee no memory corruption? Other? Thanks a lot in advance! I know: the answer to this question is probably in the latest revision of the source code, but... I doubt I will fully understand what is happening there. And I am surely not the only one in this case. Cheers, Marc