Email List: Xaustin-review-lX
[All Lists]

Defect in XSH initstate()

To: austin-review-l@xxxxxxxxxxxxx
Subject: Defect in XSH initstate()
From: drepper@xxxxxxxxxx
Date: Tue, 4 Mar 2008 21:55:05 GMT
        Defect report from : Ulrich Drepper , Red Hat, Inc.

(Please direct followup comments direct to austin-group-l@xxxxxx)

@ page 617 line 20299 section initstate() objection {ud-initstate-2}

Problem:

Edition of Specification (Year): 2004

Defect code :  1. Error

The setstate() function is defined to take a const char* parameter.  I
 cannot remember when the const was instroduced but it is not correct.
 setstate() is switching in a buffer for the state of the random()
 functions and it returns the previous state.  This implies that the
 random state buffer has to be written into.  Therefore the const must
 go.

 This change must also be run down the interps track.


Action:

XSH:

 line 20299: change from

       char *setstate(const char *state);

 to

       char *setstate(char *state);


 page 1340, line 41802:

 same change


 XBD, page 330, line 11779:

 same change

<Prev in Thread] Current Thread [Next in Thread>