[bug #20452] Incorrect use of variable_buffer_output() in expand_deps() [file.c]

2007-07-11 Thread Rafi Einstein

URL:
  

 Summary: Incorrect use of variable_buffer_output() in
expand_deps() [file.c]
 Project: make
Submitted by: rafi_einstein
Submitted on: Thursday 07/12/2007 at 00:12
Severity: 3 - Normal
  Item Group: Bug
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
   Component Version: CVS
Operating System: Any
   Fixed Release: None

___

Details:

In expand_deps() [file.c], we do:

char *p;
...
p = variable_expand ("");
variable_buffer_output (p, d->name, strlen (d->name) + 1);

and then use p as if it was pointing to the beginning of the variable buffer
(aka variable_buffer).
For a large enough string (16KB will do), variable_buffer_output() will
reallocate the variable buffer, leaving p pointing to dark places.
What we should be doing following the variable_buffer_output() call is:
p = variable_buffer;

Subsequently, we do:
char *buffer = variable_expand ("");
o = subst_expand (buffer, d->name, "%", "$*", 1, 2, 0);
d->name = strcache_add_len (buffer, o - buffer);

Again, assuming 'buffer' represents the beginning of the variable buffer.
We should rather write:
d->name = strcache_add_len (o, o - variable_buffer);






___

Reply to this item at:

  

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



___
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make


[bug #18517] Compilation error in find_directory() in dir.c on Windows platforms

2006-12-13 Thread Rafi Einstein

URL:
  

 Summary: Compilation error in find_directory() in dir.c on
Windows platforms
 Project: make
Submitted by: rafi_einstein
Submitted on: Wednesday 12/13/2006 at 16:43
Severity: 3 - Normal
  Item Group: Build/Install
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
   Component Version: CVS
Operating System: MS Windows
   Fixed Release: None

___

Details:

in find_directory():

const char *p;

#ifdef WINDOWS32
...
p[-1] = '\0';
#endif





___

Reply to this item at:

  

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



___
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make


[bug #18617] Better debugging facilities: tracing rule invocation.

2007-01-08 Thread Rafi Einstein

Follow-up Comment #2, bug #18617 (project make):

You may try looking at
http://lists.gnu.org/archive/html/help-make/2006-10/msg00033.html.
Using the -P (preprocessing) feature shows partial expansions of $(eval)
invocations.

___

Reply to this item at:

  

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



___
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make