Re: Separate open partition alloc for electron debug

20 views
Skip to first unread message

Yuki Shiino

unread,
Jul 20, 2022, 4:24:03 AM7/20/22
to Mike Belousov, yukis...@chromium.org, memory-s...@chromium.org
+cc: memory-s...@chromium.org

I'm afraid that PartitionAlloc is not yet in a state to be easily used in non-Chromium projects.  We're actively working to make PartitionAlloc usable in other projects, though.

Today, a new repository has been created to host PartitionAlloc library without requiring the entire Chromium codebase.
Having said that, I'm not sure if this is usable with Node.js project with a small amount of changes.

+cc: the team so that someone can advise more.

Cheers,
Yuki Shiino


2022年7月19日(火) 3:25 Mike Belousov <Mike.B...@bentley.com>:
Hello,

I found a thread where you were mentioning work being done on extracting PartitionAlloc from chromium, is this open and is there a state on it?

Long story short, I'm debugging an ENOMEM coming from mprotect (because the address isn't in any mapping of the process) in PartitionAlloc after some memory operations in a native addon used in an (open source) electron application.

I can't debug in electron because our renderer process crashes in debug. I was wondering if I could get a mostly-drop in malloc replacement of PartitionAlloc to test in the node-only version of the same code we have.

I am currently making a reproduction for the electron developers to look at that renderer crash in debug, but I was hoping to try to reproduce without electron as a blocker.

Is PartitionAlloc outside of chrome available somewhere?

Thank you,
Mike Belousov




This email, including any attachments, may contain confidential and/or proprietary information intended only for the use of the recipient. If you are not the intended recipient, any distribution, copying, or use of this email or its attachments is prohibited. If you received this email in error, please reply to the sender immediately and delete this message and any copies.

Bentley Systems has taken all reasonable steps to ensure that this communication is free from viruses, data corruption, and unauthorized alteration. Bentley Systems does not accept liability for any damages that may be incurred as a result of this or any communication by email


Tom Ritter

unread,
Jul 20, 2022, 9:18:41 AM7/20/22
to Yuki Shiino, Mike Belousov, memory-s...@chromium.org
I am not sure how much chromium's PartitionAlloc has diverged from it, and what those diversions represent practically, but https://github.com/struct/HardenedPartitionAlloc/ may be another option.

-tom

--
You received this message because you are subscribed to the Google Groups "memory-safety-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to memory-safety-...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/memory-safety-dev/CAN0uC_Q9W-mjh1XA_%2BQeAw5JAfP0x47fgRw6fd_4xw-8Es4ZtA%40mail.gmail.com.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Mike Belousov

unread,
Jul 20, 2022, 9:22:42 AM7/20/22
to Tom Ritter, Yuki Shiino, memory-s...@chromium.org
I actually tried his other non-hardened (much older) PartitionAlloc extraction: https://github.com/struct/PartitionAlloc
and was able to override malloc in node with it relatively easily. But it segfaulted somewhere random (idr) so I figured it wasn't worth pursuing much further.
I didn't check if the hardened one was more recent, which was a mistake. I'll try that out soon. Thank you for pointing it out.

Mike

From: Tom Ritter <t...@ritter.vg>
Sent: Wednesday, July 20, 2022 9:18 AM
To: Yuki Shiino <yukis...@chromium.org>
Cc: Mike Belousov <Mike.B...@bentley.com>; memory-s...@chromium.org <memory-s...@chromium.org>
Subject: Re: Separate open partition alloc for electron debug
 

WARNING: This email originated from outside of the organization. DO NOT click links, open attachments, or respond unless you recognize the sender and know the content is safe.


Bruce Dawson

unread,
Jul 20, 2022, 5:31:06 PM7/20/22
to Mike Belousov, Tom Ritter, Yuki Shiino, memory-s...@chromium.org
> I can't debug in electron because our renderer process crashes in debug.

It sounds like they should debug in the release version of Electron. This is more challenging than debugging the debug configuration but for PartitionAlloc-related crashes it may be unavoidable. We routinely analyze/debug crashes from the released versions of Chrome.





--
Bruce Dawson, he/him

Reply all
Reply to author
Forward
0 new messages