--
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 visit https://groups.google.com/a/chromium.org/d/msgid/memory-safety-dev/CAF3XrKqQVZA4V3Nm%3DeOucr3ExGppC3pDVnM8pO9WciruNGr-ow%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "rust-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-dev+u...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/rust-dev/CAF3XrKqQVZA4V3Nm%3DeOucr3ExGppC3pDVnM8pO9WciruNGr-ow%40mail.gmail.com.
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 visit https://groups.google.com/a/chromium.org/d/msgid/memory-safety-dev/CAH3q7_nK%2BJd5MHG5JGp1%3DLHQXOQp4QPwnKZ%2BYCVp1VwsZQQk3w%40mail.gmail.com.
--
Not to disagree with you, but non-component builds on Windows always have one copy of //base in chrome.exe and another in chrome.dll. We do consider each module to be its own allocation domain, so we try to never alloc in one and free in another. The component build makes this intractable.
--On Mon, May 5, 2025 at 12:40 PM Egor Pasko <pa...@chromium.org> wrote:Besides PartitionAlloc there are probably plenty of assumptions relying on a single instance of //base per process. Seeing a couple of uses of thread_local in task/threading/sampling_heap_profiler, plus some of our past crashes makes me believe that creating two instances of //base in one process should not be allowed.--On Fri, May 2, 2025 at 7:21 AM Daniel Cheng <dch...@chromium.org> wrote:--I recently tried to delete the non-Rust JSON parsing path: https://chromium-review.googlesource.com/c/chromium/src/+/6492579Much to my surprise, this CL was reverted due to hitting a `PA_NOTREACHED()`: https://ci.chromium.org/ui/p/chromium/builders/ci/linux-cast-x64-dbg/5720/overviewAfter a bunch of debugging and help from tasak@, the problem is due to a shared library. Specifically, cast_audio_backend_unittests depends on libcast_graphics_1.0, and libcast_graphics_1.0 depends on //base. This means we have two PartitionAllocs running around, and if we end up trying to free an allocation from one instance of PartitionAlloc from the other instance of PartitionAlloc, bad things happen.If a .so and the main binary both provide definitions for the same symbols, is there a way to reliably prevent them from stomping on each other's symbols? Or is it pretty much a hopeless task? I know there were some discussions about PartitionAlloc-Everywhere and component builds in the past, but as far as I know, we never shipped PA-E on component builds.FWIW, I think it's possible to drop the //base dependency from libcast_graphics_1.0, and I'll be pursuing that as a short-term fix, but it would be nice if we could detect/prevent this situation from happening at all.Daniel
You received this message because you are subscribed to the Google Groups "rust-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-dev+u...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/rust-dev/CAF3XrKqQVZA4V3Nm%3DeOucr3ExGppC3pDVnM8pO9WciruNGr-ow%40mail.gmail.com.
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 visit https://groups.google.com/a/chromium.org/d/msgid/memory-safety-dev/CAH3q7_nK%2BJd5MHG5JGp1%3DLHQXOQp4QPwnKZ%2BYCVp1VwsZQQk3w%40mail.gmail.com.
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.
Maybe the solution here is for //base & PartitionAlloc to be built with `-fvisibility=hidden`? That would align the way things happen in Posix with the way Windows DLLs work.Maybe Chrome should add checks that all DSOs it loads don't export any C++ symbols, so, nothing in .dynstr should start with `_*Z`.
Maybe the solution here is for //base & PartitionAlloc to be built with `-fvisibility=hidden`? That would align the way things happen in Posix with the way Windows DLLs work.Maybe Chrome should add checks that all DSOs it loads don't export any C++ symbols, so, nothing in .dynstr should start with `_*Z`.
I'm not sure the event loop has anything to do with it. In a static build, we generally can't have an allocation from one module get free'd in another. This is why, for example, the Windows SDK has these awkward things like SysFreeString -- various APIs that return strings allocated from within a system dll need to be free'd by that same system dll. To be clear, it is crashtastic to have a module that exports a function like this:
std::string DoSomeThingAndReturnAString();Because when you innocently call it from another module in the same process:{std::string result = DoSomeThingAndReturnAString();} // kablewie when `result` is destroyed.Is that what's happening in StreamMixerDeathTest.BadJsonCrashes?