[arm-gnu] Segmentation fault with arm-2009q3-67 version tool chain
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[arm-gnu] Segmentation fault with arm-2009q3-67 version tool chain
- To: arm-gnu@xxxxxxxxxxxxxxxx
- Subject: [arm-gnu] Segmentation fault with arm-2009q3-67 version tool chain
- From: raju goruganti <raju.goruganti@xxxxxxxxx>
- Date: Tue, 1 Jun 2010 13:41:02 +0530
Hi Norbert,
Thank you for your reply,
Sorry my question was wrong.
I know that my application is faulty.
Actually my question is: When i compile the test program shown below using
the flags -O1/O2/O3,Iam getting the below error,
Is it means the compiler crashing??? If it is crashing why ?
But ,If the same application is compiled for host this is not the case.I
have checked with gcc 4.4.1 of host.
/home/naveen/Public_link/arm-2009q3/bin/arm-none-linux-gnueabi-gcc -O1
test.c
test.c: In function 'FindCompoundSound':
test.c:2: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://support.codesourcery.com/GNUToolchain/> for instructions.
Application source code is:
#include<stdio.h>
unsigned long FindCompoundSound(void* pPlayer, void* data, unsigned long
dataLen, unsigned long* formats, unsigned short numFormats,
void** csData, unsigned long* csDataLen)
{
unsigned long foundFormat = 1;
unsigned short bestMatch = 0xFFFF;
unsigned long FI_DeviceSound_CacheMask = 0xFFFF;
unsigned char sData;
unsigned long sFormat;
unsigned long sLength;
unsigned short i;
for (i=0;i<numFormats;i++)
{
if ((formats[i] & FI_DeviceSound_CacheMask) == sFormat)
{
if (i < bestMatch)
{
bestMatch = i;
foundFormat = formats[i];
if (csDataLen)
{
*csDataLen = sLength;
}
}
}
}
}
int main(void)
{
FindCompoundSound(NULL,NULL,1,NULL,1,NULL,NULL);
}
But if I modify the above code as shown below, it is not giving any error
#include<stdio.h>
unsigned long FindCompoundSound(void* pPlayer, void* data, unsigned long
dataLen, unsigned long* formats, unsigned short numFormats,
void** csData, unsigned long* csDataLen)
{
unsigned long foundFormat = 1;
unsigned short bestMatch = 0xFFFF;
unsigned long FI_DeviceSound_CacheMask = 0xFFFF;
unsigned char sData;
unsigned long sFormat;
unsigned long sLength;
unsigned short i;
for (i=0;i<numFormats;i++)
{
if ((formats[i] & FI_DeviceSound_CacheMask) == sFormat)
{
if (i < bestMatch)
{
bestMatch = i;
foundFormat = formats[i];
// if (csDataLen)
// {
// *csDataLen = sLength;
// }
}
}
}
}
int main(void)
{
FindCompoundSound(NULL,NULL,1,NULL,1,NULL,NULL);
}
Plz can any one help to solve this problem?
Best Regards
Raju
<arm-gnu-help@xxxxxxxxxxxxxxxx>