mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[ion][python] Implement an architecture-dependant collect_registers.
setjmp is not guaranteed to collect all registers without modification on all platforms. This fixes the following bug: when the pointer of a newly allocated object on the Python heap is stored in rpb registers on x86_64 arch, it was not collected by the garbarge collector.
This commit is contained in:
committed by
LeaNumworks
parent
5a32006dcd
commit
3f6647f3ae
@@ -1,6 +1,7 @@
|
||||
#ifndef LIBA_SETJMP_H
|
||||
#define LIBA_SETJMP_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "private/macros.h"
|
||||
|
||||
/* We are preseving registers:
|
||||
@@ -14,7 +15,7 @@
|
||||
|
||||
LIBA_BEGIN_DECLS
|
||||
|
||||
typedef int jmp_buf[31];
|
||||
typedef uintptr_t jmp_buf[31];
|
||||
void longjmp(jmp_buf env, int val);
|
||||
int setjmp(jmp_buf env);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user