FS#53546 - [bc] kernel build hangs with bc 1.07-1
Attached to Project:
Arch Linux
Opened by userwithuid (userwithuid) - Monday, 03 April 2017, 13:53 GMT
Last edited by Antonio Rojas (arojas) - Friday, 07 April 2017, 19:52 GMT
Opened by userwithuid (userwithuid) - Monday, 03 April 2017, 13:53 GMT
Last edited by Antonio Rojas (arojas) - Friday, 07 April 2017, 19:52 GMT
|
Details
bc 1.07-1 (currently in testing), causes kernel builds to
hang during "make prepare". Might want to hold off moving to
core.
This looks like an upstream regression, so I emailed Phil Nelson (not sure if there's a better place for the bug report) this: ---------- Consider the following bc test program: print "\nEnter a number: " num = read() print "\nYour number was: ", num, "\n" quit Run it with "bc test.bc" Type "42<Enter>" Expected result: 42 is echoed and the program quits, this is the behavior in 1.06.95. Actual result: bc 1.07 keeps waiting for input. If you use a semicolon after the number, e.g. "42;<Enter>", it works fine. The impact of this bug is somewhat high, because the Linux kernel build system uses bc with the read function is this manner, see [1,2]. As a result, the build hangs indefinitely. [1] https://github.com/torvalds/linux/blob/a71c9a1c779f2499fb2afc0553e543f18aff6edf/Kbuild#L57 [2] https://github.com/torvalds/linux/blob/a71c9a1c779f2499fb2afc0553e543f18aff6edf/kernel/time/timeconst.bc#L114 ---------- |
This task depends upon
Closed by Antonio Rojas (arojas)
Friday, 07 April 2017, 19:52 GMT
Reason for closing: Fixed
Additional comments about closing: bc 1.07-2
Friday, 07 April 2017, 19:52 GMT
Reason for closing: Fixed
Additional comments about closing: bc 1.07-2
----------
Quick fix:
execute.c:
in function "int input_char (void)"
Change the lines:
if (in_ch <= ' ')
return (' ');
To:
if (in_ch <= ' ')
return (':');
I'll be doing a 1.07.1 release shortly that has a few other tweaks,
but this fix will stop the read() bug.
----------