diff options
author | Rob Browning <rlb@defaultvalue.org> | 2024-11-28 13:01:01 -0600 |
---|---|---|
committer | Rob Browning <rlb@defaultvalue.org> | 2024-11-29 12:24:57 -0600 |
commit | 76afb429ee7a8a4c9eddb20bf29a2246192f8a28 (patch) | |
tree | 93016a6342e3be66dbcf2322f9269d6a51d019cd /libguile/strings.h | |
parent | c78abcb765fcc85b335ab781bdaea13deddbaf1a (diff) | |
download | guile-76afb429ee7a8a4c9eddb20bf29a2246192f8a28.tar.gz |
Eight byte align statically allocated stringbufs
Previously they were unaligned, unlike their parent strings, and so
could end up with the wrong pointer tag. Observed on i686-linux-gnu,
where they ended up tagged as immediates (SCM_IMP()), causing failures
in TYP7 related checks.
* libguile/strings.h (SCM_IMMUTABLE_STRINGBUF): align resulting buffer
via SCM_ALIGNED(8).
Diffstat (limited to 'libguile/strings.h')
-rw-r--r-- | libguile/strings.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/strings.h b/libguile/strings.h index f28ef3246..d417514f8 100644 --- a/libguile/strings.h +++ b/libguile/strings.h @@ -184,7 +184,7 @@ SCM_API SCM scm_makfromstrs (int argc, char **argv); #ifdef SCM_SUPPORT_STATIC_ALLOCATION #define SCM_IMMUTABLE_STRINGBUF(c_name, contents) \ - static SCM_UNUSED const \ + static SCM_UNUSED SCM_ALIGNED(8) const \ struct \ { \ scm_t_bits word_0; \ |