-
- Downloads
Make generate-id() deterministic
Rework the generate-id() function to return deterministic values. We use a simple incrementing counter and store ids in the 'psvi' member of nodes which was freed up by previous commits. The presence of an id is indicated by a new "source node" flag. This fixes long-standing problems with reproducible builds, see https://bugzilla.gnome.org/show_bug.cgi?id=751621 This also hardens security, as the old implementation leaked the difference between a heap and a global pointer, see https://bugs.chromium.org/p/chromium/issues/detail?id=1356211 The old implementation could also generate the same id for dynamically created nodes which happened to reuse the same memory. Ids for namespace nodes were completely broken. They now use the id of the parent element together with the hex-encoded namespace prefix.
Showing
- libxslt/functions.c 91 additions, 16 deletionslibxslt/functions.c
- libxslt/xsltInternals.h 1 addition, 0 deletionslibxslt/xsltInternals.h
- libxslt/xsltutils.h 1 addition, 0 deletionslibxslt/xsltutils.h
- tests/REC/test-12.4-1.out 11 additions, 0 deletionstests/REC/test-12.4-1.out
- tests/REC/test-12.4-1.xml 6 additions, 0 deletionstests/REC/test-12.4-1.xml
- tests/REC/test-12.4-1.xsl 38 additions, 0 deletionstests/REC/test-12.4-1.xsl
- tests/exslt/common/dynamic-id.out 13 additions, 0 deletionstests/exslt/common/dynamic-id.out
- tests/exslt/common/dynamic-id.xml 1 addition, 0 deletionstests/exslt/common/dynamic-id.xml
- tests/exslt/common/dynamic-id.xsl 29 additions, 0 deletionstests/exslt/common/dynamic-id.xsl
Loading
Please register or sign in to comment