Differences From Artifact [3b48513197]:
- File
src/runtime/amiga-library.m
— part of check-in
[2fee820b5d]
at
2020-09-29 22:21:14
on branch trunk
— runtime: Make object_isTaggedPointer() a function
If it is an inline, changing how tagged pointers work internally would
break the ABI and require recompiling everything, making future changes
harder. (user: js, size: 18390) [annotate] [blame] [check-ins using] [more...]
To Artifact [ed1a8dcdb1]:
- File
src/runtime/amiga-library.m
— part of check-in
[4d470a65d4]
at
2020-11-14 15:55:54
on branch trunk
— runtime: Fix theoretically invalid SysBase
This is theoretical, as this is happening in Forbid() and hence nothing
should be able to change it, even after FreeMem(). However, some
debugging tools might break Forbid(), and this commit fixes those. (user: js, size: 18695) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
327 328 329 330 331 332 333 | child->dataSeg += DATA_OFFSET; return &child->library; } static void * | | > > | > > > > > > > | 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | child->dataSeg += DATA_OFFSET; return &child->library; } static void * expunge(struct ObjFWRTBase *base, struct ExecBase *sysBase) { #define SysBase sysBase void *segList; if (base->parent != NULL) { base->parent->library.lib_Flags |= LIBF_DELEXP; return 0; } if (base->library.lib_OpenCnt > 0) { base->library.lib_Flags |= LIBF_DELEXP; return 0; } segList = base->segList; Remove(&base->library.lib_Node); FreeMem((char *)base - base->library.lib_NegSize, base->library.lib_NegSize + base->library.lib_PosSize); return segList; #undef SysBase } static void *__saveds lib_expunge(void) { OBJC_M68K_ARG(struct ObjFWRTBase *, base, a6) return expunge(base, SysBase); } static void *__saveds lib_close(void) { /* * SysBase becomes invalid during this function, so we store it in * sysBase and add a define to make the inlines use the right one. */ struct ExecBase *sysBase = SysBase; #define SysBase sysBase OBJC_M68K_ARG(struct ObjFWRTBase *, base, a6) if (base->parent != NULL) { struct ObjFWRTBase *parent; #ifdef OF_AMIGAOS_M68K if (base->initialized) |
︙ | ︙ | |||
384 385 386 387 388 389 390 | base->library.lib_NegSize + base->library.lib_PosSize); base = parent; } if (--base->library.lib_OpenCnt == 0 && (base->library.lib_Flags & LIBF_DELEXP)) | | > | 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 | base->library.lib_NegSize + base->library.lib_PosSize); base = parent; } if (--base->library.lib_OpenCnt == 0 && (base->library.lib_Flags & LIBF_DELEXP)) return expunge(base, sysBase); return NULL; #undef SysBase } static void * lib_null(void) { return NULL; } |
︙ | ︙ |