-
-
Save hryx/3b0b926f43944da597daedb125eb201e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(lldb) target create "bin/zig" | |
Current executable set to 'bin/zig' (x86_64). | |
(lldb) run translate-c-2 ../../../zig/bugs/translateme.c | |
Process 8408 launched: '/home/hryx/projects/software/clones/zig/build/bin/zig' (x86_64) | |
error: need to add support for DW_TAG_base_type 'void' encoded with DW_ATE = 0x7, bit_size = 0 | |
error: need to add support for DW_TAG_base_type 'u1' encoded with DW_ATE = 0x7, bit_size = 0 | |
Process 8408 stopped | |
* thread #1, name = 'zig', stop reason = signal SIGSEGV: invalid address (fault address: 0x7fffff7feff8) | |
frame #0: 0x0000000000c1b8a4 zig`translate_c.transImplicitCastExpr(rp=translate_c.RestorePoint @ 0x00007fffffffbc18, scope=0x000000000339b9e0, expr=0x0000000003398d20) at translate_c.zig:464:49 | |
461 expr: *const ZigClangImplicitCastExpr, | |
462 ) !TransResult { | |
463 const c = rp.c; | |
-> 464 switch (ZigClangImplicitCastExpr_getCastKind(expr)) { | |
465 .BitCast => { | |
466 const node = try transExpr(rp, scope, @ptrCast(*const ZigClangExpr, expr), .used, .r_value); | |
467 const dest_type = getExprQualType(c, @ptrCast(*const ZigClangExpr, expr)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(lldb) p root_node->decls | |
error: need to add support for DW_TAG_base_type 'u2' encoded with DW_ATE = 0x7, bit_size = 0 | |
error: need to add support for DW_TAG_base_type 'u29' encoded with DW_ATE = 0x7, bit_size = 24 | |
(std.segmented_list.SegmentedList(*std.zig.ast.Node,4)) $0 = { | |
prealloc_segment = { | |
[0] = 0x0000000000000000 | |
[1] = 0x0000000000000000 | |
[2] = 0x0000000000000000 | |
[3] = 0x0000000000000000 | |
} | |
dynamic_segments = { | |
ptr = 0x0000000000000000 | |
len = 0 | |
} | |
allocator = 0x00007fffffffc7f8 | |
len = 0 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void foon3(void); | |
void barf3(void) { | |
void* func_ptr = foon3; | |
void (*typed_func_ptr)(void) = (void (*)(void))(unsigned long)func_ptr; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment