patchThe GNU Bourne-Again SHell - Patches: patch #10210, Fix a makefile race with mkbuiltins

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #10210: Fix a makefile race with mkbuiltins

Submitter:  Alexander Kanavin <kanavin>
Submitted:  Tue 24 May 2022 02:00:21 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Open

Wed 25 May 2022 09:59:55 PM UTC, comment #1: 

Thanks. I added this, differing in only minor details, to builtins/Makefile.in. It will be in the next devel branch push.

Chet Ramey <chet>
Group administrator
Tue 24 May 2022 02:00:21 PM UTC, original submission:  

The main makefile can call mkbuiltins from multiple different codepaths in parallel.
When called, it moves the existing files out the way and creates new ones, then
compares which will break the build if timing is unlucky.

The root of the problem is mkbuiltins.c creating a file but also referencing that
file under the same name. By modifing it to allow the final name and the temp name
to be specified, we can avoid the original reason for the moving of files around.
This allows them to be created under a new name and then replaced if changed,
removing any race windows around accessing the files whilst they've been
moved or are being rewritten.

See https://bugzilla.yoctoproject.org/show_bug.cgi?id=14227


Alexander Kanavin <kanavin>

 

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

Attached Files
file #53251:  makerace2.patch added by kanavin (4KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by kanavin (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-05-25 chet StatusNone Done
    2022-05-24 kanavin Attached File- Added makerace2.patch, #53251

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code