It's a binary compiled by C. I wanted to run some code on heap,but I got a segment fault. Then I use gdb to check the binary. It showed the NX was disabled and I had RWX access on stack segment while I could only have RW access on heap segment.This happened on a linux 5.10 kernel debian. Then I ran this binary on a linxu 5.10 kernel Alpine Docker on my Macbook, it happened,too.
I remembered that I could execute code in heap a year before. And I tried to run this binary again on an old Ubuntu18 with linux 5.0 kernel. It returned successfully. The codes in stack were executed without error.
In all, my question is if there is any new feature updated from linux 5.0 to linux 5.10 which leads to the heap not executable anymore.