Boost logo

Boost :

From: Lewis Hyatt (lhyatt_at_[hidden])
Date: 2005-09-25 21:46:20


Hi All,

I apologize if this has been reported before, but I couldn't find it
after a long search. I encountered problems building bjam on a standard
Linux distribution (uname -a: Linux 2.4.21-32.0.1.EL #1 Wed May 25
14:34:59 EDT 2005 i686 i686 i386 GNU/Linux) with gcc. (same problem with
  gcc 3.2.2 or 4.0.1). The executable seg faulted every time. I tracked
it to the function var_defines() in variable.c which had a logic error
at lines 124-130. I didn't investigate far enough to determine why the
function was receiving strings consisting of a single quote, and I do
not know if this is irregular or not, but in any case the attached patch
  (output from diff -c) corrects the issue.

-Lewis


*** boost-jam-3.1.11/variable.c 2005-05-29 23:42:38.000000000 -0400
--- variable.c 2005-09-25 22:27:31.000000000 -0400
***************
*** 121,127 ****
  # endif
                  size_t len = strlen(val + 1);
  
! int quoted = val[1] == '"' && val[len] == '"';
                  
                  if ( quoted && preprocess )
                  {
--- 121,127 ----
  # endif
                  size_t len = strlen(val + 1);
  
! int quoted = val[1] == '"' && val[len] == '"' && len>1;
                  
                  if ( quoted && preprocess )
                  {


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk