bugmake - Bugs: bug #62324, Fix cache integrity check

 
 

bug #62324: Fix cache integrity check

Submitter:  Dmitry Goncharov <dgoncharov>
Submitted:  Sat 16 Apr 2022 05:59:23 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.4 Operating System:  None
Fixed Release:  4.4 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 24 Apr 2022 06:25:22 PM UTC, comment #1: 

Thanks, fixed!

Paul D. Smith <psmith>
Group administrator
Sat 16 Apr 2022 05:59:23 PM UTC, original submission:  


.SECONDEXPANSION:
all: bye.x
%.x: $$(firstword %.1;



The makefile presented above causes make to fail integrity self check                                                            
with the following message                                                                                                       
                                                                                                                                 
make: * unterminated call to function 'firstword': missing ')'.  Stop.                                                         
make: bye.x: Field 'stem' not cached: bye

This "'stem' not cached" failure happens, because in pattern_search file->stem is temporarily set to a value for the sake of set_file_variables and reset afterwords.  However, before file->stem can be reset variable_expand_for_file is called and it bumps to the syntax error and causes make to perform integrity self check before exiting. The integrity check fails, because the stem in question was never cached.                                                                                                           

This fix adds a dedicated stem parameter to set_file_variables to relieve the callers from having to modify and then restore file->stem.                                                                                                                           

src/commands.c (set_file_variables): Take second parameter stem to relieve the callers of set_file_variables from setting and restoring file->stem.
src/commands.h (set_file_variables): Ditto.
(execute_file_commands): Pass file->stem to set_file_variables.                                                                  
src/file.c (expand_deps): Pass d->stem to set_file_variables and remove no longer needed code to set and restore file->stem.
src/implicit.c (pattern_search): Pass stem_str to set_file_variables and remove no longer needed code to set and reset file->stem.
tests/scripts/features/se_explicit: Add new tests.
tests/scripts/features/se_implicit: Ditto.
tests/scripts/features/se_statpat: Ditto.
tests/scripts/variables/automatic: Ditto.

Dmitry Goncharov <dgoncharov>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #53096:  sv62324_test.diff added by dgoncharov (2KiB - text/x-patch)
file #53097:  sv62324_fix.diff added by dgoncharov (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 psmith (Posted a comment)
  • -email is unavailable- added by dgoncharov (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.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-09-20 psmith StatusNone Fixed
    2022-04-24 psmith Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.4
    2022-04-16 dgoncharov Attached File- Added sv62324_test.diff, #53096
        Attached File- Added sv62324_fix.diff, #53097

    Back to the top

    Powered by Savane 3.13-da57.
    Corresponding source code