mirror of
https://github.com/rubyjs/mini_racer
synced 2023-03-27 23:21:28 -04:00
Fix sign-extension in Isolate Data (#213)
C++ will 'promote' a bitfield member that is narrower than an int into an int on arithmetic, leading to sign extension when converted back to a wider type.
This commit is contained in:
parent
50c36648b5
commit
496f829f89
1 changed files with 1 additions and 1 deletions
|
@ -155,7 +155,7 @@ public:
|
|||
case IN_GVL: return u.IN_GVL;
|
||||
case DO_TERMINATE: return u.DO_TERMINATE;
|
||||
case MEM_SOFTLIMIT_REACHED: return u.MEM_SOFTLIMIT_REACHED;
|
||||
case MEM_SOFTLIMIT_MAX: return u.MEM_SOFTLIMIT_MAX << 10;
|
||||
case MEM_SOFTLIMIT_MAX: return static_cast<uintptr_t>(u.MEM_SOFTLIMIT_MAX) << 10;
|
||||
case MARSHAL_STACKDEPTH_REACHED: return u.MARSHAL_STACKDEPTH_REACHED;
|
||||
case MARSHAL_STACKDEPTH_VALUE: return u.MARSHAL_STACKDEPTH_VALUE;
|
||||
case MARSHAL_STACKDEPTH_MAX: return u.MARSHAL_STACKDEPTH_MAX;
|
||||
|
|
Loading…
Add table
Reference in a new issue