BUG: L1103 Error when Initializing __huge Data ArrayLast reviewed: July 22, 1997Article ID: Q116372 |
1.00 1.50
WINDOWS
kbprg kbbuglist kberrmsg
The information in this article applies to:
SYMPTOMSWhen you build a project containing an initialized huge array, the linker generates this error message:
L1103: TEST5_DATA : attempt to access data outside segment boundsTEST is the name of the source file where the initialization occurred.
WORKAROUNDTo work around this problem:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThis problem occurs only if an element that is near the 64K boundary of the array is initialized. In the sample code below, initializing the member "a[0].b" causes the error to occur:
Sample Code*\ The following code sample does reproduce the problem.
// TEST1.Cstruct test { int a[32767]; char b;}; struct test _huge a[2] = {{{1,2,3},{'a'}}, {{11,12,13},{'b'}}};
void main() {}The following code samples do not reproduce the problem:
// TEST2.C int x[32767] = {1,2,3}; int y[32767] = {11,12,13};struct test { int *a; char b;}; struct test _huge a[2] = {{x,'a'}, {y,'b'}};
void main() {} // TEST3.Cstruct test { int a[32767]; char b;}; struct test _huge a[2] = {0}; //Initialization prevents L1072 error
void main() { a[0].a[0] = 1; a[0].a[1] = 2; a[0].a[2] = 3; a[0].b = 'a'; a[1].a[0] = 11; a[1].a[1] = 12; a[1].a[2] = 13; a[1].b = 'b';}
|
Additional reference words: 1.00 1.50 7.00 8.00 8.00c memory model
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |