Author Topic: [Bug report] CodeBlocks crash when adding file to the project  (Read 15076 times)

AdrianB

  • Guest
Re: [Bug report] CodeBlocks crash when adding file to the project
« Reply #15 on: September 08, 2016, 12:45:11 pm »
Hi ollydbg,

More or less. In may case small project with one main.c file and small size I occurred crashes when even I've tried to type printf(" for example.
But who know maybe is the same issue.
I will try to catch the crash.

Kind regards,
Adrian

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [Bug report] CodeBlocks crash when adding file to the project
« Reply #16 on: September 09, 2016, 11:38:50 pm »
OK, I correctly locate the bug, and please test this patch, I think it should fix the crash issue.

Code
From 06b24abc0710e6befcbcbb18ad353aa8ae8a334f Mon Sep 17 00:00:00 2001
From: asmwarrior <asmwarrior@gmail.com>
Date: Wed, 7 Sep 2016 14:46:48 +0800
Subject: * CC: fix a endless loop crash bug when parsing C99 designated
 initializer
...

FYI: the patch is in SVN trunk now(rev 10900).
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.