<story><title>Chromium bug bounty money tree browser</title><url>https://lyra.horse/misc/chromium_vrp_tree.html</url></story><parent_chain><item><author>evmar</author><text>It&amp;#x27;s interesting to browse the large collection under chrome&amp;#x2F;browser&amp;#x2F;ui and ponder over how many of them are use-after-free for data where the performance of manual memory management really doesn&amp;#x27;t matter.  Like [1] which is around the lifecycle of a &amp;quot;choose a file&amp;quot; dialog.&lt;p&gt;It feels like in the big picture sense it would be better to just always using some sort of smarter&amp;#x2F;slower pointers in this kind of code just for extra defense.  I saw in [2] there is some sort of `raw_ptr&amp;lt;T&amp;gt;` type [3] that seems to intend to help, so maybe the crash in [2] was actually successfully defended against?&lt;p&gt;It&amp;#x27;s too bad that there&amp;#x27;s not a good way to have a broader way to switch between dialects within a project where in one place it&amp;#x27;s &amp;quot;this portion of the code is perf-critical and carefully reviewed&amp;quot; and in another &amp;quot;this portion of the code is perf-oblivious and has lots of async state that&amp;#x27;s easy to get wrong&amp;quot;.  I&amp;#x27;ve wondered if it&amp;#x27;s almost worth mixing two separate languages (like a GCed one for the latter) just to make the distinction clear.&lt;p&gt;[Disclaimer: worked on this code many years ago, wouldn&amp;#x27;t be surprised if I caused &amp;gt;0 of these bugs...]&lt;p&gt;[1] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;bugs.chromium.org&amp;#x2F;p&amp;#x2F;chromium&amp;#x2F;issues&amp;#x2F;detail?id=1201032&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;bugs.chromium.org&amp;#x2F;p&amp;#x2F;chromium&amp;#x2F;issues&amp;#x2F;detail?id=120103...&lt;/a&gt;
[2] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;bugs.chromium.org&amp;#x2F;p&amp;#x2F;chromium&amp;#x2F;issues&amp;#x2F;detail?id=1323239&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;bugs.chromium.org&amp;#x2F;p&amp;#x2F;chromium&amp;#x2F;issues&amp;#x2F;detail?id=132323...&lt;/a&gt;
[3] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;source.chromium.org&amp;#x2F;chromium&amp;#x2F;chromium&amp;#x2F;src&amp;#x2F;+&amp;#x2F;main:base&amp;#x2F;memory&amp;#x2F;raw_ptr.md&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;source.chromium.org&amp;#x2F;chromium&amp;#x2F;chromium&amp;#x2F;src&amp;#x2F;+&amp;#x2F;main:bas...&lt;/a&gt;</text></item></parent_chain><comment><author>Tuna-Fish</author><text>&amp;gt; It&amp;#x27;s too bad that there&amp;#x27;s not a good way to have a broader way to switch between dialects within a project where in one place it&amp;#x27;s &amp;quot;this portion of the code is perf-critical and carefully reviewed&amp;quot; and in another &amp;quot;this portion of the code is perf-oblivious and has lots of async state that&amp;#x27;s easy to get wrong&amp;quot;. I&amp;#x27;ve wondered if it&amp;#x27;s almost worth mixing two separate languages (like a GCed one for the latter) just to make the distinction clear.&lt;p&gt;You are describing Rust&amp;#x27;s &amp;quot;unsafe&amp;quot; keyword.&lt;p&gt;And this kind of code is very literally the original impetus of it. The language was sort of originally designed to implement a browser, after all.</text></comment>
<story><title>Chromium bug bounty money tree browser</title><url>https://lyra.horse/misc/chromium_vrp_tree.html</url></story><parent_chain><item><author>evmar</author><text>It&amp;#x27;s interesting to browse the large collection under chrome&amp;#x2F;browser&amp;#x2F;ui and ponder over how many of them are use-after-free for data where the performance of manual memory management really doesn&amp;#x27;t matter.  Like [1] which is around the lifecycle of a &amp;quot;choose a file&amp;quot; dialog.&lt;p&gt;It feels like in the big picture sense it would be better to just always using some sort of smarter&amp;#x2F;slower pointers in this kind of code just for extra defense.  I saw in [2] there is some sort of `raw_ptr&amp;lt;T&amp;gt;` type [3] that seems to intend to help, so maybe the crash in [2] was actually successfully defended against?&lt;p&gt;It&amp;#x27;s too bad that there&amp;#x27;s not a good way to have a broader way to switch between dialects within a project where in one place it&amp;#x27;s &amp;quot;this portion of the code is perf-critical and carefully reviewed&amp;quot; and in another &amp;quot;this portion of the code is perf-oblivious and has lots of async state that&amp;#x27;s easy to get wrong&amp;quot;.  I&amp;#x27;ve wondered if it&amp;#x27;s almost worth mixing two separate languages (like a GCed one for the latter) just to make the distinction clear.&lt;p&gt;[Disclaimer: worked on this code many years ago, wouldn&amp;#x27;t be surprised if I caused &amp;gt;0 of these bugs...]&lt;p&gt;[1] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;bugs.chromium.org&amp;#x2F;p&amp;#x2F;chromium&amp;#x2F;issues&amp;#x2F;detail?id=1201032&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;bugs.chromium.org&amp;#x2F;p&amp;#x2F;chromium&amp;#x2F;issues&amp;#x2F;detail?id=120103...&lt;/a&gt;
[2] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;bugs.chromium.org&amp;#x2F;p&amp;#x2F;chromium&amp;#x2F;issues&amp;#x2F;detail?id=1323239&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;bugs.chromium.org&amp;#x2F;p&amp;#x2F;chromium&amp;#x2F;issues&amp;#x2F;detail?id=132323...&lt;/a&gt;
[3] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;source.chromium.org&amp;#x2F;chromium&amp;#x2F;chromium&amp;#x2F;src&amp;#x2F;+&amp;#x2F;main:base&amp;#x2F;memory&amp;#x2F;raw_ptr.md&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;source.chromium.org&amp;#x2F;chromium&amp;#x2F;chromium&amp;#x2F;src&amp;#x2F;+&amp;#x2F;main:bas...&lt;/a&gt;</text></item></parent_chain><comment><author>wongarsu</author><text>&amp;gt;  I&amp;#x27;ve wondered if it&amp;#x27;s almost worth mixing two separate languages (like a GCed one for the latter) just to make the distinction clear.&lt;p&gt;Python, with perf critical sections written in C or Rust is pretty much that. From what I hear the Rust-Python bindings are especially good, and make the correctness part easier even in the performance critical parts.&lt;p&gt;Or you can go the opposite way and call out to a scripting language from your fast language. Today everyone is hyped about wasm for that, but we also have about two decades of computer games using lua for that (and games are probably the single biggest category of performance sensitive software)</text></comment>