bugGnash - The GNU Flash player - Bugs: bug #38419, $(realpath ...) doesn't recover...


bug #38419: $(realpath ...) doesn't recover from signals

Submitted by:  None
Submitted on:  Tue 26 Feb 2013 10:20:08 PM UTC  
Category: NoneSeverity: 3 - Normal
Release: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 26 Feb 2013 10:20:08 PM UTC, original submission:

func_realpath doesn't check errno at all. When running in parallel builds, if the parent gmake process receives a signal in the middle of calling `realpath` it'll act as though the file does not exist.

Suggested fix:

< while ( errno == EINTR || (path = find_next_token (&p, &len)) != 0)

> while ( (path = find_next_token (&p, &len)) != 0)

The above use of || will shortcut and prevent it from pre-maturely grabbing the next token.

I haven't evaluated this to see if something more comprehensive could/should be done (eg, checking other "errno" values, etc).

I haven't finished validating whether this completely resolves the problem, but so far it seems to have done just that. Furthermore, I don't have any ideas for how to implement a test for this as it's a race condition that isn't necessarily easy to reproduce.

I highly recommend evaluating other system functions used by gmake to determine whether this sort of issue could crop up elsewhere (eg, `$(abspath ...)`, etc)



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.


Please enter the title of George Orwell's famous dystopian book (it's a date):



No Changes Have Been Made to This Item

Back to the top

Powered by Savane 3.1-cleanup1