Better HN
topnewbestaskshowjobs
Log inSign up

c99throwa1

6 karma · joined Sep 14, 2015 (11y ago) · 1 submissions

Submissions

comment 11y ago · link · parent

It is an interesting implementation. Tl;dr: they took a C interpreter for Java (with unsafe memory management) and implemented fat pointers (Java object + offset) in the interpreter.

The paper claims the implementation obeys C99, but there seems to be a violation around pointer round-tripping. Specifically, they forbid all casts from integers to pointers.

  char a, *p;
  
  p = (char*)(uintptr_t)&a;
In most C implementations, this is perfectly valid. In the paper's, it breaks.

Anyway, very interesting.