You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's wrong / what should be happening instead:
Seems like stack memory is not executable, but on Ubuntu it is executable.
And as far as I know gcc using executable stack for trampoline code for nested functions.
On real Ubuntu or any other linux it runs successfully and echoes "Hello world":
(gdb) r
Starting program: /home/user/work/lambda
Program received signal SIGSEGV, Segmentation fault.
0x00007ffffffde030 in ?? ()
(gdb) bt
#0 0x00007ffffffde030 in ?? ()
#1 0x00000000004005ad in funct2 (f=0x7ffffffde030) at lambda.c:6
#2 0x0000000000400612 in func () at lambda.c:10
#3 0x0000000000400637 in main () at lambda.c:17
(gdb)
Your Windows build number:
Microsoft Windows [Version 10.0.16299.309]
What you're doing and what's happening:
I've wrote C code with lambda function.
This code successfully compiles in WSL using gcc, in real Ubuntu 16.04 too.
But when I try to run it, I get this:
Seems like stack memory is not executable, but on Ubuntu it is executable.
And as far as I know gcc using executable stack for trampoline code for nested functions.
On real Ubuntu or any other linux it runs successfully and echoes "Hello world":
The text was updated successfully, but these errors were encountered: