Follow-up Comment #1, bug #36925 (project make):

After more investigation I've created a much simpler example in the attached
file Makefile2. With this example the location of the current directory is no
longer important.

What is important is the following:
  - Use of second expansion.
  - A function call in the prerequisite list that's expanded during second
expansion and that appears around the 200th character in the prerequisite
list.
  - The use of eval to define the affected rule.

Building Makefile2 results in the access of freed/uninitialised memory.

I'm not sure if it's related, but while I investigated I commented out the
.SECONDEXPANSION line and built the makefile with the -p option. I was
expecting the prerequisites of 'all' to contain '$(dir' and '$@)', but instead
-p showed prerequistes of '$(dir)' and '$($@)' - note the extra brackets and
dollar. Perhaps this is indicative of a problem with the way prerequistes are
being parsed that also results in memory problems when second expansion is
enabled.

I'll continue to investigate but right now I'm a bit lost trying to understand
how the GNU Make code works.

regards,
Rob.

(file #26381)
    _______________________________________________________

Additional Item Attachment:

File name: Makefile2                      Size:0 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36925>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to