Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Incorrectly built binary which accesses errno or h_errno directly. Needs to be fixed. (does this affect functionality?)

459 views
Skip to first unread message

Alex

unread,
Jun 14, 2010, 12:11:52 PM6/14/10
to
Hi,

While running a rather old 3-rd party program on Linux, I get this
message:
"Incorrectly built binary which accesses errno or h_errno directly.
Needs to be fixed."

The executable seems to run fine however.

I found the article about this here: http://en.wikipedia.org/wiki/Error_code
The article doesn't explicitly say that the program runs correctly, it
just says it 'runs'.

Are there any links to official Linux pages which says if executable
'definitely runs correctly' or 'definitely does not run correctly if
accessing errno'. Upgrading the executable may turn into a big
project, and I'd rather not have it come up in the middle of a
development cycle, but rather schedule the upgrade at a quieter time.

Thanks
Alex

Rainer Weikusat

unread,
Jun 14, 2010, 2:42:27 PM6/14/10
to
Alex <anywhe...@gmail.com> writes:
> While running a rather old 3-rd party program on Linux, I get this
> message:
> "Incorrectly built binary which accesses errno or h_errno directly.
> Needs to be fixed."
>
> The executable seems to run fine however.

[...]

> Are there any links to official Linux pages which says if executable
> 'definitely runs correctly' or 'definitely does not run correctly if
> accessing errno'.

'errno' is meanwhile defined as thread-local object (and usually used
via function call) and this means the compiler needs to generate
'special' access code for it (thread-local variables reside at
positions relative to the value of a particular register). Because of
this, I consider it unlikely that your program can still correctly
determine the system error code corresponding with system call
failures. Provided it doesn't regularly do anything because of
specific system call failures (common in certain types of 'bad
practice' code, eg, checking file permissions with access(2) or using
stat(2) to determine if a file should be created) it should otherwise
continue to work.

NB: This is my not entirely uninformed opinion on the topic, nothing
more.

Måns Rullgård

unread,
Jun 14, 2010, 3:02:37 PM6/14/10
to
Rainer Weikusat <rwei...@mssgmbh.com> writes:

In most cases I'd expect it to work, even if some incorrect error
messages might be displayed. The one case I can think of that might
really fail is checking errno for EAGAIN after a non-blocking read/write.

--
M�ns Rullg�rd
ma...@mansr.com

0 new messages