You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by ying lcs <yi...@gmail.com> on 2008/12/06 05:43:53 UTC

Build error of Apache M5 on ubuntu 8.10

Hi,

I am trying to build apache harmony m5 on ubuntu 8.10,
But i get the following error:


[compile-cc] /usr/include/bits/string3.h:82: error: call to
'__warn_memset_zero_len' declared with attribute warning: memset used
with constant zero length parameter; this could be due to transposed
parameters
[compile-cc] In function 'void* memset(void*, int, size_t)',
[compile-cc]     inlined from 'void
Jitrino::OptInitAction::readFlags()' at
/media/olddata/apache-harmony-src-r713673/working_vm/vm/jitrino/src/optimizer/optimizer.cpp:195:
[compile-cc] /usr/include/bits/string3.h:82: error: call to
'__warn_memset_zero_len' declared with attribute warning: memset used
with constant zero length parameter; this could be due to transposed
parameters

BUILD FAILED

Can you please help me with my error?

Re: Build error of Apache M5 on ubuntu 8.10

Posted by Nathan Beyer <nd...@apache.org>.
I've applied a fix at r724034.

On Sat, Dec 6, 2008 at 12:34 PM, Nathan Beyer <nd...@apache.org> wrote:
> I'm seeing this too in the trunk. I'm testing the switch to see if it
> compiles correctly. From what I can tell, the code is incorrect.
>
> -Nathan
>
> On Sat, Dec 6, 2008 at 6:02 AM, Alexei Fedotov <al...@gmail.com> wrote:
>> Hello Ying,
>> As the warning suggests, we likely should have the size and 0
>> attributes of memset [1] transposed at optimizer.cpp initialization:
>>
>>    optimizerFlags.abcdFlags = new (mm) AbcdFlags;
>>    memset(optimizerFlags.abcdFlags, sizeof(AbcdFlags), 0);
>>
>>    optimizerFlags.gcmFlags = new (mm) GcmFlags;
>>    memset(optimizerFlags.gcmFlags, sizeof(GcmFlags), 0);
>>
>>    optimizerFlags.memOptFlags = new (mm) MemoptFlags;
>>    memset(optimizerFlags.memOptFlags, sizeof(MemoptFlags), 0);
>>
>>    optimizerFlags.syncOptFlags = new (mm) SyncOptFlags;
>>    memset(optimizerFlags.syncOptFlags, sizeof(SyncOptFlags), 0);
>>
>>    optimizerFlags.loopBuilderFlags = new (mm) LoopBuilderFlags;
>>    memset(optimizerFlags.loopBuilderFlags, sizeof(LoopBuilderFlags), 0);
>>
>>    optimizerFlags.dabceFlags = new (mm) DynamicABCEFlags;
>>    memset(optimizerFlags.dabceFlags, sizeof(DynamicABCEFlags), 0);
>>
>> The problem was introduced by the cumulative HARMONY-1363 patch.
>> Thanks.
>>
>> [1] http://www.cplusplus.com/reference/clibrary/cstring/memset.html
>>
>> On Sat, Dec 6, 2008 at 7:43 AM, ying lcs <yi...@gmail.com> wrote:
>>> Hi,
>>>
>>> I am trying to build apache harmony m5 on ubuntu 8.10,
>>> But i get the following error:
>>>
>>>
>>> [compile-cc] /usr/include/bits/string3.h:82: error: call to
>>> '__warn_memset_zero_len' declared with attribute warning: memset used
>>> with constant zero length parameter; this could be due to transposed
>>> parameters
>>> [compile-cc] In function 'void* memset(void*, int, size_t)',
>>> [compile-cc]     inlined from 'void
>>> Jitrino::OptInitAction::readFlags()' at
>>> /media/olddata/apache-harmony-src-r713673/working_vm/vm/jitrino/src/optimizer/optimizer.cpp:195:
>>> [compile-cc] /usr/include/bits/string3.h:82: error: call to
>>> '__warn_memset_zero_len' declared with attribute warning: memset used
>>> with constant zero length parameter; this could be due to transposed
>>> parameters
>>>
>>> BUILD FAILED
>>>
>>> Can you please help me with my error?
>>>
>>
>>
>>
>> --
>> С уважением,
>> Алексей Федотов,
>> ЗАО «Телеком Экспресс»
>>
>

Re: Build error of Apache M5 on ubuntu 8.10

Posted by Nathan Beyer <nd...@apache.org>.
I'm seeing this too in the trunk. I'm testing the switch to see if it
compiles correctly. From what I can tell, the code is incorrect.

-Nathan

On Sat, Dec 6, 2008 at 6:02 AM, Alexei Fedotov <al...@gmail.com> wrote:
> Hello Ying,
> As the warning suggests, we likely should have the size and 0
> attributes of memset [1] transposed at optimizer.cpp initialization:
>
>    optimizerFlags.abcdFlags = new (mm) AbcdFlags;
>    memset(optimizerFlags.abcdFlags, sizeof(AbcdFlags), 0);
>
>    optimizerFlags.gcmFlags = new (mm) GcmFlags;
>    memset(optimizerFlags.gcmFlags, sizeof(GcmFlags), 0);
>
>    optimizerFlags.memOptFlags = new (mm) MemoptFlags;
>    memset(optimizerFlags.memOptFlags, sizeof(MemoptFlags), 0);
>
>    optimizerFlags.syncOptFlags = new (mm) SyncOptFlags;
>    memset(optimizerFlags.syncOptFlags, sizeof(SyncOptFlags), 0);
>
>    optimizerFlags.loopBuilderFlags = new (mm) LoopBuilderFlags;
>    memset(optimizerFlags.loopBuilderFlags, sizeof(LoopBuilderFlags), 0);
>
>    optimizerFlags.dabceFlags = new (mm) DynamicABCEFlags;
>    memset(optimizerFlags.dabceFlags, sizeof(DynamicABCEFlags), 0);
>
> The problem was introduced by the cumulative HARMONY-1363 patch.
> Thanks.
>
> [1] http://www.cplusplus.com/reference/clibrary/cstring/memset.html
>
> On Sat, Dec 6, 2008 at 7:43 AM, ying lcs <yi...@gmail.com> wrote:
>> Hi,
>>
>> I am trying to build apache harmony m5 on ubuntu 8.10,
>> But i get the following error:
>>
>>
>> [compile-cc] /usr/include/bits/string3.h:82: error: call to
>> '__warn_memset_zero_len' declared with attribute warning: memset used
>> with constant zero length parameter; this could be due to transposed
>> parameters
>> [compile-cc] In function 'void* memset(void*, int, size_t)',
>> [compile-cc]     inlined from 'void
>> Jitrino::OptInitAction::readFlags()' at
>> /media/olddata/apache-harmony-src-r713673/working_vm/vm/jitrino/src/optimizer/optimizer.cpp:195:
>> [compile-cc] /usr/include/bits/string3.h:82: error: call to
>> '__warn_memset_zero_len' declared with attribute warning: memset used
>> with constant zero length parameter; this could be due to transposed
>> parameters
>>
>> BUILD FAILED
>>
>> Can you please help me with my error?
>>
>
>
>
> --
> С уважением,
> Алексей Федотов,
> ЗАО «Телеком Экспресс»
>

Re: Build error of Apache M5 on ubuntu 8.10

Posted by Alexei Fedotov <al...@gmail.com>.
Hello Ying,
As the warning suggests, we likely should have the size and 0
attributes of memset [1] transposed at optimizer.cpp initialization:

    optimizerFlags.abcdFlags = new (mm) AbcdFlags;
    memset(optimizerFlags.abcdFlags, sizeof(AbcdFlags), 0);

    optimizerFlags.gcmFlags = new (mm) GcmFlags;
    memset(optimizerFlags.gcmFlags, sizeof(GcmFlags), 0);

    optimizerFlags.memOptFlags = new (mm) MemoptFlags;
    memset(optimizerFlags.memOptFlags, sizeof(MemoptFlags), 0);

    optimizerFlags.syncOptFlags = new (mm) SyncOptFlags;
    memset(optimizerFlags.syncOptFlags, sizeof(SyncOptFlags), 0);

    optimizerFlags.loopBuilderFlags = new (mm) LoopBuilderFlags;
    memset(optimizerFlags.loopBuilderFlags, sizeof(LoopBuilderFlags), 0);

    optimizerFlags.dabceFlags = new (mm) DynamicABCEFlags;
    memset(optimizerFlags.dabceFlags, sizeof(DynamicABCEFlags), 0);

The problem was introduced by the cumulative HARMONY-1363 patch.
Thanks.

[1] http://www.cplusplus.com/reference/clibrary/cstring/memset.html

On Sat, Dec 6, 2008 at 7:43 AM, ying lcs <yi...@gmail.com> wrote:
> Hi,
>
> I am trying to build apache harmony m5 on ubuntu 8.10,
> But i get the following error:
>
>
> [compile-cc] /usr/include/bits/string3.h:82: error: call to
> '__warn_memset_zero_len' declared with attribute warning: memset used
> with constant zero length parameter; this could be due to transposed
> parameters
> [compile-cc] In function 'void* memset(void*, int, size_t)',
> [compile-cc]     inlined from 'void
> Jitrino::OptInitAction::readFlags()' at
> /media/olddata/apache-harmony-src-r713673/working_vm/vm/jitrino/src/optimizer/optimizer.cpp:195:
> [compile-cc] /usr/include/bits/string3.h:82: error: call to
> '__warn_memset_zero_len' declared with attribute warning: memset used
> with constant zero length parameter; this could be due to transposed
> parameters
>
> BUILD FAILED
>
> Can you please help me with my error?
>



-- 
С уважением,
Алексей Федотов,
ЗАО «Телеком Экспресс»