interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / om / standalone-oracles / red.c

11 lines · 531 bytes Raw Blame History
1/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */
2/* Verification-only corruption at the strong Omega ABI. */
3#include <stdint.h>
4#include <stdlib.h>
5uint32_t __real_omega_so_oracles(uint64_t *,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t);
6uint32_t __wrap_omega_so_oracles(uint64_t *out,uint64_t op,uint64_t a,uint64_t b,uint64_t c,uint64_t d) {
7 uint32_t rc=__real_omega_so_oracles(out,op,a,b,c,d);
8 const char *red=getenv("SO_RED_OP");
9 if(!rc && red && op==strtoul(red,NULL,0))*out=!*out;
10 return rc;
11}