Here's the hard-core problem.
I have a piece of code written in C++. The code is part of a website, run on Apache and built using PHP. Every time a user submits some data, the code will process those data. However, the code always throws coredump error (signal 11) when called through the web interface. It runs no problem at all in the shell under my own username. I also tried to run it as user www-data and it works well.
So my question is really down to Why it doesn't run when called through the web interface and how to fix it?
The OS is Ubuntu Server 12.04 x64.
Many many thanks.