Overview
Comment: | runtime: Fix theoretically invalid SysBase
This is theoretical, as this is happening in Forbid() and hence nothing |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
4d470a65d4a86b5195944300ef51f100 |
User & Date: | js on 2020-11-14 15:55:54 |
Other Links: | manifest | tags |
Context
2020-11-15
| ||
15:19 | Remove object_getTaggedPointerClass from Amiga lib check-in: 661c36631a user: js tags: trunk | |
2020-11-14
| ||
19:26 | Merge trunk into branch "amiga-library" check-in: 2f8792bc1d user: js tags: amiga-library | |
15:55 | runtime: Fix theoretically invalid SysBase check-in: 4d470a65d4 user: js tags: trunk | |
14:51 | runtime: Fix recursive call in Amiga linklib check-in: b14e3d5ba6 user: js tags: trunk | |
Changes
Modified src/runtime/amiga-library.m from [3b48513197] to [ed1a8dcdb1].
︙ | ︙ | |||
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; } |
︙ | ︙ |