Skip to content

Regression in 22.7+ causing malloc: Incorrect checksum for freed object #55145

@steipete

Description

@steipete

Version

v22.7.0 and newer

Platform

Darwin Mac.attlocal.net 24.1.0 Darwin Kernel Version 24.1.0: Tue Sep 17 07:49:15 PDT 2024; root:xnu-11215.40.59~38/RELEASE_ARM64_T8122 arm64

Subsystem

No response

What steps will reproduce the bug?

Create a sample project of Plasmo:

npm create plasmo

Then run it

npm run dev

Will yield

node(88503,0x1728df000) malloc: Incorrect checksum for freed object 0x13bac0e00: probably modified after being freed.
Corrupt value: 0x80b00000000
node(88503,0x172ceb000) malloc: Incorrect checksum for freed object 0x13c372e00: probably modified after being freed.
Corrupt value: 0x80b00000000
node(88503,0x1730f7000) malloc: Incorrect checksum for freed object 0x11cb05a00: probably modified after being freed.
Corrupt value: 0x80b00000000
node(88503,0x1728df000) malloc: *** set a breakpoint in malloc_error_break to debug
node(88503,0x1730f7000) malloc: *** set a breakpoint in malloc_error_break to debug
error: script "dev" was terminated by signal SIGABRT (Abort)

I found this error reported a few weeks back on PlasmoHQ/plasmo#1060 and then tried all node version and found that it got first introduced in 22.7, 22.6 and earlier work.

How often does it reproduce? Is there a required condition?

Reproduces 100% on my MacBook Air 15-inch, M3, 2024

What is the expected behavior? Why is that the expected behavior?

Should build the extension, not crash

What do you see instead?

malloc crash

Additional information

No difference if I use npm, pnpm or bun.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions