Malloc broke Serenity's JPGLoader, or: how to win the lottery

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • serenity

    The Serenity Operating System 🐞

    Given SerenityOS's stance on gender-neutral language[0], I think it would be safe to say the use of the Lenna image was deliberate. There's been backlash against using cropped pin-ups as test images since at least the 90s[1], this isn't something they would have just now discovered.

    [0] https://github.com/SerenityOS/serenity/pull/24647

    [1] https://youtu.be/yCdwm2vo09I?si=fGo3ujI_aqLTMuRj

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

    InfluxDB logo
  • papers

    ISO/IEC JTC1 SC22 WG21 paper scheduling and management (by cplusplus)

    For whatever its worth, if we wait long enough C++ will include the equivalent of `malloc_good_size`. https://github.com/cplusplus/papers/issues/18

  • rust

    Empowering everyone to build reliable and efficient software.

    Ah, sorry I didn't read that closely.

    One minor nit (which the Perl press releases also mess up): the randomisation is per-interpreter, not per-process.

    That's not a pedantic distinction. I've seen a couple of bugs/bad behaviors caused by forking servers forgetting to call srand(3)/re-randomize the hash seed after fork(2) and then relying on more randomness than they actually have.

    Forking has also caused randomness-related issues (though not necessarily specifically re: hashing) for Rust[1] and Ruby[2], and probably many other platforms. OpenSSL seems to sidestep[3] the issue by using the PID as part of its salt internally.

    1: https://github.com/rust-lang/rust/issues/16799

    2: https://bugs.ruby-lang.org/issues/4579

    3: https://wiki.openssl.org/index.php/Random_fork-safety

  • rust-playground

    The Rust Playground

    It's pretty easy to try out: https://play.rust-lang.org/?version=stable&mode=debug&editio...

    Now, if you have an enum such as `serde_json::Value` which is kind of recursive with its `Map` variant, and you have a ton of dynamic JSON parsing in your code, these numbers really add up. And serde_json uses `BTreeMap` by default which is even smaller than `HashMap`.

    The learning here is to avoid dynamic JSON parsing if you can. And if needing it, but not caring the insertion order, avoid the `preserve_order` feature flag.

    The other learning here is that there is no map structure that fits to all purposes. They all have their pros and cons and you should choose the right one for the problem.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

Did you konow that Rust is
the 5th most popular programming language
based on number of metions?