Hello Go Experts,
Can someone please help on this? When we invoke CGO and there is a crash in 
C code, is it possible to get the complete C stack details to debug the 
problem? I am not seeing much information regarding this.

Best Regards
Mariappan

On Friday, December 23, 2022 at 3:27:51 AM UTC+5:30 mariappan balraj wrote:

> Hi,
>
> I have following programming where making CGO from GO code. test3() is 
> called from Go code. Which calls test2() and which calls test1(). In 
> test1(), there is a NULL pointer assignment. I could able to generate the 
> core dump when running the program. But when I use gdb, I am not getting 
> the stack trace. Can someone please help?
>
> package main
>
> /*
>
> void test1(void) {
>
>    int *p = (int*)NULL;
>
>    *p = 30;
>
> }
>
>
> void test2(void) { 
>
>     test1();
>
> }
>
>
> void test3(void) { 
>
>     test2();
>
> }
>
> */
>
> import "C"
>
>
> func main() {
>
>     C.test3();
>
> }
>
> Best Regards
>
> Mariappan
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/f4c9c45e-3847-47f4-a664-23e684fcf1e9n%40googlegroups.com.

Reply via email to