My guess is that you need to set the compiler options to ensure a double is 8 
bytes to match Go. 

My point still applies - the stack is being corrupted due to a size mismatch in 
the parameters/return values. 

The fact that the original bug said it worked on Linux and crashed on windows 
and now it is crashing on two different versions of Linux is additional 
evidence. 

I think the exact compiler version and command line options are needed to 
diagnose. 

> On Feb 16, 2022, at 8:27 AM, Robert Engels <reng...@ix.netcom.com> wrote:
> 
> 
> You might want to share a small reproducible test case - it is almost 
> certainly an issue on your end. Most likely stack corruption creating invalid 
> pointer/return addresses. When you return a double rather than a float you 
> are changing the stack size and alignment. 
> 
>>> On Feb 16, 2022, at 8:19 AM, stryker2k2 <stryker...@gmail.com> wrote:
>>> 
>> Folks of golang-nuts,
>> 
>> It is now February of 2022 and it seems that "strtod" is still and issue. 
>> After hours of searching for a solution, I found this Google Group dated 8 
>> years earlier (technically 7 1/2 years) and found my answer! So, although I 
>> am raising an old post from the grave, I feel that I must add in my findings 
>> for the next poor chap who sees this post in 8 years and also show my 
>> appreciation nearly a decade afterwards.
>> 
>> We have a very complex program that we compile for Windows 7/10 using the 
>> developers choice of either Ubuntu 18.04 ( gcc version 7.3-win32) and/or 
>> Ubuntu 20.04 (gcc version 9.3-win32). My developers using Ubuntu 18.04 (gcc 
>> 7.3) noticed that a portion of our program would crash when being accessed. 
>> I did some digging and this is what I saw...
>> 
>> `strtod` compiled on Ubuntu 18.04 (gcc 7.3) = CRASH
>> `strtod` compiled on Ubuntu 20.04 (gcc 9.3) = No Issue
>> 
>> That lead me to this post. 
>> 
>> We are now using `strtold` instead. `strtold` works on both version of 
>> Ubuntu/gcc.
>> 
>> Thank you all a ton for having this conversation 8+ years ago! You all rock!
>>> On Wednesday, October 15, 2014 at 8:34:50 PM UTC-5 brainman wrote:
>>> I don't know what the problem is, but I have created new issue for it 
>>> https://code.google.com/p/go/issues/detail?id=8941.
>>> 
>>> Alex
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golang-nuts+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/55152b22-0581-4780-82ce-e29f82310579n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/5DA39BAD-9FF4-4A71-8EFB-75BBCDFC5A68%40ix.netcom.com.

Reply via email to