This is only seen on Ubuntu. Probably it has something related to how source is compiled, but I can’t get why. Is strcpy()
performed multi-threaded/multi-processor way? Anyone can explain?
I have a string, where I search for character and remove it using strcat()
. When space char is found at position count
, I perform
*(buffer + count) = 0x00;
strcat(buffer, buffer + count + 1);
With ARM this code never has a problem, with x86/Ubuntu I get the following progress
mosquittoQos=1 # quality of service
mosquittoQos=1 # quality of serviee
mosquittoQos=1 # quality of servie
mosquittoQos=1 ## quality of servie
Strings do not overlap at the input, but then overlap as function progresses. This issue does not always happen, and it happens almost always if I run the application as a daemon.