Mercurial > pub > dyncall > dyncall
comparison test/call_suite_aggrs/main.c @ 597:0179c25fd855
- test/call_suite_aggrs: LL-suffixed long long int constant to avoid side-effects and warning
author | Tassilo Philipp |
---|---|
date | Tue, 20 Sep 2022 10:44:57 +0200 |
parents | 806e415df417 |
children | 57ad31f924bb |
comparison
equal
deleted
inserted
replaced
596:1586812f8eed | 597:0179c25fd855 |
---|---|
145 case '{': /* struct */ | 145 case '{': /* struct */ |
146 { | 146 { |
147 /* bound check memory adjacent to returned aggregate, to check for overflows by dcCallAggr */ | 147 /* bound check memory adjacent to returned aggregate, to check for overflows by dcCallAggr */ |
148 long long* adj_ll = (get_max_aggr_size() - rtype_size) > sizeof(long long) ? (long long*)((char*)V_a[pos] + rtype_size) : NULL; | 148 long long* adj_ll = (get_max_aggr_size() - rtype_size) > sizeof(long long) ? (long long*)((char*)V_a[pos] + rtype_size) : NULL; |
149 if(adj_ll) | 149 if(adj_ll) |
150 *adj_ll = 0x0123456789abcdef; | 150 *adj_ll = 0x0123456789abcdefLL; |
151 | 151 |
152 s = ((int(*)(const void*,const void*))rtype_a_cmp)(dcCallAggr(p, t, rtype_a, V_a[pos]), K_a[pos]); | 152 s = ((int(*)(const void*,const void*))rtype_a_cmp)(dcCallAggr(p, t, rtype_a, V_a[pos]), K_a[pos]); |
153 | 153 |
154 if(adj_ll && *adj_ll != 0x0123456789abcdef) { | 154 if(adj_ll && *adj_ll != 0x0123456789abcdefLL) { |
155 printf("writing rval overflowed into adjacent memory;"); | 155 printf("writing rval overflowed into adjacent memory;"); |
156 return 0; | 156 return 0; |
157 } | 157 } |
158 break; | 158 break; |
159 } | 159 } |