I ran it as: ./wcalc --defaults -P10 'exp(-581)' and got the output:
= 4.7304887525e-253
If you are getting a seg-fault, I'm guessing it is triggered by one of your configuration settings. Can you post your ~/.wcalcrc so I can duplicate exactly what wcalc is doing?
Also, try testing with the --defaults argument, which forces wcalc to ignore your ~/.wcalcrc. If you can replicate my success, then we'll know we're getting somewhere. Otherwise, it suggests a problem in your build of wcalc, rather than in wcalc itself.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hrm. I don't have access to a machine with 3.1.2... my Ubuntu box has 3.1.1, and my Debian has 3.1.0. Further, valgrind seems to indicate a clean execution, which doesn't really help. Are you able to put it in a debugger and get a backtrace of where it's segfaulting? Maybe that can help me narrow it down.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've attempted to add the debug flag before compiling by following this procedure (http://stackoverflow.com/a/4680578/1358677). Please advise if there's a better way because the gdb output still appears to have some optimisation. Here's the output of gdb http://pastebin.com/YFknYmsS
Note: if I run the binary compiled by the package manager, there's a crash. What's really weird is if I compile a manually downloaded version of wcalc, then run ./wcalc --defaults -P10 'exp(-581)' there is no crash..
Last edit: Manifold 2013-11-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since we can't recreate this bug with the source you can download from this repo, I suspect this must be a bug created by some patch your distribution has added. As such, until we can get more clarity, I'm going to close this bug. If we get more information about how to generate the crash, we can re-open.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I ran it as: ./wcalc --defaults -P10 'exp(-581)' and got the output:
= 4.7304887525e-253
If you are getting a seg-fault, I'm guessing it is triggered by one of your configuration settings. Can you post your ~/.wcalcrc so I can duplicate exactly what wcalc is doing?
Also, try testing with the --defaults argument, which forces wcalc to ignore your ~/.wcalcrc. If you can replicate my success, then we'll know we're getting somewhere. Otherwise, it suggests a problem in your build of wcalc, rather than in wcalc itself.
If I run
wcalc --defaults -P10 'exp(-581)'
I get
= 0.0000000000
Segmentation fault (core dumped)
As far as I'm aware, I don't have a .wcalcrc.
I'm using archlinux - don't know if you're aware of its packaging system, though it should be reasonably transparent. Here it is: https://aur.archlinux.org/packages/wc/wcalc/PKGBUILD
As you can see, there doesn't appear to be any custom flags set.
I see that wcalc depends on mpfr. My version of that is 3.1.2.p3-2
Hope I can be of further help.
Last edit: Manifold 2013-11-15
Hrm. I don't have access to a machine with 3.1.2... my Ubuntu box has 3.1.1, and my Debian has 3.1.0. Further, valgrind seems to indicate a clean execution, which doesn't really help. Are you able to put it in a debugger and get a backtrace of where it's segfaulting? Maybe that can help me narrow it down.
I've attempted to add the debug flag before compiling by following this procedure (http://stackoverflow.com/a/4680578/1358677). Please advise if there's a better way because the gdb output still appears to have some optimisation. Here's the output of gdb http://pastebin.com/YFknYmsS
Note: if I run the binary compiled by the package manager, there's a crash. What's really weird is if I compile a manually downloaded version of wcalc, then run ./wcalc --defaults -P10 'exp(-581)' there is no crash..
Last edit: Manifold 2013-11-16
Since we can't recreate this bug with the source you can download from this repo, I suspect this must be a bug created by some patch your distribution has added. As such, until we can get more clarity, I'm going to close this bug. If we get more information about how to generate the crash, we can re-open.