help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using make to run binaries


From: Greg Chicares
Subject: Re: using make to run binaries
Date: Wed, 19 Sep 2007 14:44:58 +0000
User-agent: Thunderbird 1.5.0.10 (Windows/20070221)

On 2007-09-19 13:42Z, Andreas Maunz wrote:
> Hi Dave,
> 
>>   Here's a thought: does it still happen if you compile your program with
>> -O0,
>> i.e. no optimisation?
> 
> this actually did the trick! :-) Can you elaborate a little on that? How
> specifically does this affect the execution of the program? We tried

I still suspect that this explains it:

On 2007-09-17 18:16Z, Dave Korn wrote:
|
| The situation smells like undefined behaviour to me; if
| you're using an uninitialised variable or in some other way depending on
| random memory contents, that could trigger the different behaviour in your
| program.

and that this is only a misleading clue:

> 'rake' in the meantime and it produced the manual result (without -O0). So
> it looks like some make-specific oddity.

Last time I had to track down undefined behavior, my program
ran "correctly" in zsh, but incorrectly in bash. That's not
because zsh is good or bash is bad. It's just the way
undefined behavior manifests itself. I found an uninitialized
variable, and initialized it properly, and now the program
works the same way in both shells.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]