diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-06-09 07:55:05 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-06-09 07:55:05 +0300 |
commit | 85e15f54e4d7f326200562ba7f9ca4a96e420164 (patch) | |
tree | 5900bff2bd6be3eb00813befc26c6043239a1596 /typd_mlc.c | |
parent | 4e020ef3c5367ddb79617d7c22504e5f3a130392 (diff) | |
download | bdwgc-85e15f54e4d7f326200562ba7f9ca4a96e420164.tar.gz |
Workaround 'insufficient space for complex_descriptor' sanitizer FP error
(fix of commit 1f45c9a9f)
* typd_mlc.c (GC_make_sequence_descriptor): Change type of result local
variable from complex_descriptor* to struct SequenceDescriptor*; cast
result variable to complex_descriptor* on return; add comment.
Diffstat (limited to 'typd_mlc.c')
-rw-r--r-- | typd_mlc.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -188,20 +188,23 @@ STATIC complex_descriptor *GC_make_sequence_descriptor( complex_descriptor *first, complex_descriptor *second) { - complex_descriptor *result = (complex_descriptor *) + struct SequenceDescriptor *result = (struct SequenceDescriptor *) GC_malloc(sizeof(struct SequenceDescriptor)); + /* Note: for a reason, the sanitizer runtime complains */ + /* of insufficient space for complex_descriptor if the */ + /* pointer type of result variable is changed to. */ if (EXPECT(NULL == result, FALSE)) return NULL; /* Can't result in overly conservative marking, since tags are */ /* very small integers. Probably faster than maintaining type info. */ - result -> sd.sd_tag = SEQUENCE_TAG; - result -> sd.sd_first = first; - result -> sd.sd_second = second; + result -> sd_tag = SEQUENCE_TAG; + result -> sd_first = first; + result -> sd_second = second; GC_dirty(result); REACHABLE_AFTER_DIRTY(first); REACHABLE_AFTER_DIRTY(second); - return result; + return (complex_descriptor *)result; } #define SIMPLE 0 |