@@ -420,27 +420,27 @@ static inline void * align_ptr(void * p)
420
420
static void FindLiveRangeReverse (PtrArray * arr , void * start , void * end )
421
421
{
422
422
// HACK: the following deals with stacks of 'negative size' exposed by
423
- // Julia -- however, despite us having this code in here for a few years,
424
- // I now think it may actually be due to a bug on the Julia side. See
425
- // <https://github.com/JuliaLang/julia/pull/54639> for details .
423
+ // Julia -- this was due to a bug on the Julia side. It was finally fixed
424
+ // by <https://github.com/JuliaLang/julia/pull/54639>, which should
425
+ // hopefully appear in Julia 1.12 .
426
426
if (lt_ptr (end , start )) {
427
427
SWAP (void * , start , end );
428
428
}
429
- #if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR <= 11
430
429
// adjust for Julia guard pages if necessary
431
- // In Julia >= 1.12 this is no longer necessary thanks
432
- // to <https://github.com/JuliaLang/julia/pull/54591>
433
- // TODO: hopefully this actually also gets backported to 1.11.0
430
+ //
431
+ // For a time I hoped this wouldn't be necessary anymore in Julia >= 1.12
432
+ // due to <https://github.com/JuliaLang/julia/pull/54591> but that PR was
433
+ // later reverted by <https://github.com/JuliaLang/julia/pull/55555>.
434
434
//
435
435
// unfortunately jl_guard_size is not exported; fortunately it
436
436
// is the same in all Julia versions were we need it
437
437
else {
438
- void * new_start = (char * )start + (4096 * 8 );
438
+ const size_t jl_guard_size = (4096 * 8 );
439
+ void * new_start = (char * )start + jl_guard_size ;
439
440
if ((uintptr_t )new_start <= (uintptr_t )end ) {
440
441
start = new_start ;
441
442
}
442
443
}
443
- #endif
444
444
char * p = (char * )(align_ptr (start ));
445
445
char * q = (char * )end - sizeof (void * );
446
446
while (!lt_ptr (q , p )) {
0 commit comments