Skip to contentSkip to conversation

bc segfaults when using math library, and patch

Buildroot grepper 2 participants 2 messages Jun 9, 2015 – Jun 10, 2015

lore
Share & tools
lore

grepper

author
#0 lore raw

I have attached a patch that fixes the segfault in bc when it is used with the math library loaded. A developer on #buildroot also commented that perhaps buildroot should use the alpha version of bc like many distros instead - I can't comment on that.

regards,
Robert

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_mathlib_segfault.patch
Type: text/x-patch
Size: 464 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150609/0e61a099/attachment.bin>

#1 lore raw
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"grepper" == grepper <[email protected]> writes:

I have attached a patch that fixes the segfault in bc when it is used with the math library loaded. A developer on #buildroot also commented that perhaps buildroot should use the alpha version of bc like many distros instead - I can't comment on that.

I was going to ask if this is already upstream and if you had a reference to the upstream version control, but GNU bc doesn't seem to have any public vcs (or any real activity).

I see the latest alpha release is from 2006, and that one does make save_adr static and NEWS contains the following note:

Bug fixes:
fixes bug in load_code introduced by mathlib string storage in 1.06.

I personally don't use bc, but if people (and other distributions) think the 1.06.95 alpha version is better then lets use it.

A quick look at the Debian package shows that they are carrying some patches that might be interesting, E.G. 03_array_initialize.diff seems like a clear bugfix:

https://packages.debian.org/jessie/bc

Care to send a patch to bump the version with this info?

Signature · 1 line
Bye, Peter Korsgaard