Bug report in EasyC v2 pic label: goto label;

I used the assignment drag-and-drop to type

label: goto label;

in the sample program for the ultrasound sensor,
then pressed f7 for compile and download.

The computer disk thrashed and became unresponsive,
to the point where I had to hold the power button to do instant shutdown.

Please do not try this at home, and be sure to save all your work first.

I tested the software and was able to reproduce the issue, Your code “label: goto label;” is incorrect syntax and causes the compiler to use about 1GB of ram before it figures out that the code is bad. I tested on windows XP 2.4GHz P4 with 2GB of RAM and neither easyC or my System crashed. Though on a system with “limited” amounts of memory could crash. You will notice Label and Goto are not in the tree, as it can get you in trouble if used incorrectly. Also, you should use the usercode block.

Example

label:
//Some code

if (Something == 1) {
goto label;
}

Thanks for rapid confirmation and workaround.
I’ll try the usercode block version soon.

Using user code with “label: goto label;” will not work either. You have to use the code as I demonstrated. I recommend against using label/goto and using functions instead.