summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2022-07-13 14:08:55 +0200
committerYves Orton <demerphq@gmail.com>2022-07-15 17:25:20 +0200
commit24a3add986669c1f4ad5040b224428bd097b944e (patch)
tree5de012d4599f7dbe62cc7242e7343c4c97a2b36d /perl.c
parent38b12af0e35eec7a8da5bb5a28a3032d24402ef9 (diff)
downloadperl-24a3add986669c1f4ad5040b224428bd097b944e.tar.gz
regcomp.h: deal with 64 bit aligned pointer data in regex program.
We cannot safely store 64 bit aligned data in a regnode structure due to the implicit 32 bit alignment the base structure forces on the data. Thanks to Tony Cook for the suggestion on how to cleanly support variable sized pointers without alignment issues. I am pretty sure we should not be storing pointers in the regexp program like this. In most cases where we need an SV attached to a regnode structure we store it in the 'data' array which part of the regexp structure, and then store an index to that item in the regnode. This allows the use of a smaller member for the index instead. This was identified by running "make test_reonly" under the ubsan build: ./Configure -d -Doptimize=-g -Dusedevel -DDEBUGGING \ -Accflags='-fsanitize=address -fsanitize=undefined \ -ggdb3' -Aldflags='-Wl,--no-as-needed -lasan -lubsan' \ -Dcc=ccache\ gcc -Dld=gcc
Diffstat (limited to 'perl.c')
0 files changed, 0 insertions, 0 deletions