diff options
author | Vincent Ambo <mail@tazj.in> | 2023-08-23T22·19+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-09-01T13·50+0000 |
commit | eb0b33db729962a612000e97df7fc820bcc2973e (patch) | |
tree | 70a7e544358ce40f70ede61e34c25257a2b7463e /users/tazjin/presentations/tvix-eval-2023/cppnix-example-smuggling.cpp | |
parent | 88c3e2b4a0cf5ca8ca76ba828eecfc16e22267de (diff) |
feat(tazjin/presentations): bootstrap tvix-eval-2023 presentation r/6540
I spent way too much time fighting LaTeX to do roughly what I want here again, but all the alternatives are even worse. Change-Id: Ibe12a4ce175ceb73e9d6e276613dcd4827dd76c4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9150 Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: Mark Shevchenko <markshevchenko@gmail.com> Tested-by: BuildkiteCI
Diffstat (limited to 'users/tazjin/presentations/tvix-eval-2023/cppnix-example-smuggling.cpp')
-rw-r--r-- | users/tazjin/presentations/tvix-eval-2023/cppnix-example-smuggling.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/users/tazjin/presentations/tvix-eval-2023/cppnix-example-smuggling.cpp b/users/tazjin/presentations/tvix-eval-2023/cppnix-example-smuggling.cpp new file mode 100644 index 000000000000..ee0ab4ab4117 --- /dev/null +++ b/users/tazjin/presentations/tvix-eval-2023/cppnix-example-smuggling.cpp @@ -0,0 +1,12 @@ +struct Env { + Value * values[0]; + // ... some more fields +}; + +// .... + +if (env->type == Env::HasWithExpr) { + Value * v = allocValue(); + evalAttrs(*env->up, (Expr *) env->values[0], *v, noPos, "<borked>"); + // ... +} |