summaryrefslogtreecommitdiff
path: root/typd_mlc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-06-09 07:55:05 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-06-09 07:55:05 +0300
commit85e15f54e4d7f326200562ba7f9ca4a96e420164 (patch)
tree5900bff2bd6be3eb00813befc26c6043239a1596 /typd_mlc.c
parent4e020ef3c5367ddb79617d7c22504e5f3a130392 (diff)
downloadbdwgc-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.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/typd_mlc.c b/typd_mlc.c
index f5da09a8..ee2d0799 100644
--- a/typd_mlc.c
+++ b/typd_mlc.c
@@ -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