r/cpp • • Oct 03 '26

C++ future at Adobe

So if anyone was still curious what happened to Hylo, or where Adobe stands in regards to the whole safety discussion,

David Sankel has done a talk at RustConf on the matter, Zngur: Simplified Rust/C++ Integration.

The way Adobe now sees C++ is described on slide 2, at 50 seconds mark.

80 Upvotes

111 comments sorted by

View all comments

Show parent comment

3

u/ts826848 Oct 11 '26

Rust is also quite the performance hit and everyone pretends it’s okay.

Even if you assume the first half of that sentence is true (and that's a rather debatable assumption to say the least) whatever runtime hit you experience with Rust is going to be nowhere close to the runtime hit you'd experience with Valgrind unless you're purposefully doing something obtuse. Even more so if you're dealing with a multithreaded program since Valgrind serializes your program.

Valgrind also has actual memory safety guarantees

At this point in time memory safety at the cost of an associated runtime is hardly anything special. Rust garnered the attention it did in no small part due to delivering memory safety without requiring that runtime.

But even putting that aside, Valgrind does not guarantee memory safety. Consider this obviously memory unsafe program:

#include <stdint.h>
#include <stdio.h>

void evil() {
    int j = 0;
    printf("%lu\n", (uintptr_t)&j);
    int* pj = &j;
    int* pi = &pj[-16]; // Adjust as necessary
    *pi = 4;
}

int main() {
    double i = 0;
    printf("%lu\n", (uintptr_t)&i);
    printf("%g\n", i);
    evil();
    printf("%g\n", i);
}

There's at least two distinct UBs (OOB pointer arithmetic/dereference and a strict aliasing violation), and yet Valgrind (and ASan/UBSan, for that matter) says the program is perfectly fine:

==35417== Memcheck, a memory error detector
==35417== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==35417== Using Valgrind-3.22.0 and LibVEX; rerun with -h for copyright info
==35417== Command: ./a.out
==35417==
137422174832
0
137422174788
1.97626e-323
==35417==
==35417== HEAP SUMMARY:
==35417==     in use at exit: 0 bytes in 0 blocks
==35417==   total heap usage: 1 allocs, 1 frees, 1,024 bytes allocated
==35417==
==35417== All heap blocks were freed -- no leaks are possible
==35417==
==35417== For lists of detected and suppressed errors, rerun with: -s
==35417== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Not really the output I'd hope to see from a solution that "has actual memory safety guarantees".