Here's a transcipt of something very similar that seems to result in an infinite loop on Linux. :(
dvanhorn@starburst:small $ cat f.c
int f() {
return 42;
}
int (*ptr_to_f)() = f;
| https://umd.zoom.us/j/93087492464?pwd=bUU1OVJYbUtBRlN2UFNRVlQ1K1dpZz09 |
| #lang racket | |
| (require redex) | |
| (current-cache-all? #t) | |
| ;; String -> (Listof 1String) | |
| (define (explode s) | |
| (car (apply-reduction-relation* split+join s))) | |
| ;; String -> Void | |
| (define (show-explode s) |
| I am testifying today as a public witness to express my total dismay | |
| at the prospect of the Council moving forward to confirm Mr. Lott as | |
| Director of DDOT. | |
| My daughter is a former kindergarten schoolmate of Allison Hart. | |
| Allison was struck and killed while in a District crosswalk about six | |
| weeks ago. I learned of her death at school drop-off by overhearing | |
| one five year old explain to another ``someone in my class died | |
| yesterday.'' |
| ☞ # finds .dylib version first, but that's not the kind of linking we're doing | |
| ☞ # so barfs | |
| ☞ ld -lunistring -exported_symbol _uc_is_property_white_space -r -arch x86_64 -o runtime.o | |
| ld: warning: /usr/local/lib/libunistring.dylib, ignoring unexpected dylib file | |
| Undefined symbols for architecture x86_64: | |
| "_uc_is_property_white_space", referenced from: | |
| -exported_symbol[s_list] command line option | |
| ld: symbol(s) not found for architecture x86_64 | |
| ☞ # finds .a version because ain't no search, so it works, but ugh. | |
| ☞ ld /usr/local/lib/libunistring.a -exported_symbol _uc_is_property_white_space -r -arch x86_64 -o runtime.o |
| global frog | |
| global duck | |
| default rel | |
| section .text | |
| extern ptr_to_f | |
| extern f | |
| frog: | |
| sub rsp, 8 | |
| lea rax, [rel f wrt ..plt] | |
| call rax |
| global frog | |
| global duck | |
| default rel | |
| section .text | |
| extern ptr_to_f | |
| extern f | |
| frog: | |
| sub rsp, 8 | |
| lea rax, [rel f wrt ..plt] | |
| call rax |
Here's a transcipt of something very similar that seems to result in an infinite loop on Linux. :(
dvanhorn@starburst:small $ cat f.c
int f() {
return 42;
}
int (*ptr_to_f)() = f;
| int f () { | |
| return 42; | |
| } |
| on: | |
| - push | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| - name: Install dependencies |
| #lang racket | |
| (define in "...") | |
| (define ss | |
| (sort (for/list ([l (in-list (with-input-from-string in port->lines))]) | |
| (string->number | |
| (string-append "#b" | |
| (regexp-replaces l '(("F" "0") | |
| ("B" "1") | |
| ("L" "0") |