Skip to content

Commit 6b5190f

Browse files
committed
[MERGE #5472 @MSLaguana] Removing write barrier on non-recycler data
Merge pull request #5472 from MSLaguana:fixSerializeAccess When detaching a `JsrtExternalArrayBuffer` we heap allocate a `JsrtExternalArrayBufferDetachedState`, but on this non-recycler object we had a `Field` which would attempt to set the dirty bit in the card table. Because the object wasn't recycler allocated, the index is out of bounds of the card table, leading to an access violation. Fixes #5461
2 parents d7e19fd + 9d8492e commit 6b5190f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Jsrt/JsrtExternalArrayBuffer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ namespace Js {
2020

2121
private:
2222
FieldNoBarrier(JsFinalizeCallback) finalizeCallback;
23-
Field(void *) callbackState;
23+
FieldNoBarrier(void *) callbackState;
2424

2525
class JsrtExternalArrayBufferDetachedState : public ExternalArrayBufferDetachedState
2626
{
2727
FieldNoBarrier(JsFinalizeCallback) finalizeCallback;
28-
Field(void *) callbackState;
28+
FieldNoBarrier(void *) callbackState;
2929
public:
3030
JsrtExternalArrayBufferDetachedState(BYTE* buffer, uint32 bufferLength, JsFinalizeCallback finalizeCallback, void *callbackState);
3131
virtual void ClearSelfOnly() override;

0 commit comments

Comments
 (0)