- PR#5509: misclassification of statically-allocated empty array that

falls exactly at beginning of an otherwise unused data page.
- i386/emit_nt.mlp: add zero word at end of data segment, like in other ports.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12166 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Leroy 2012-02-18 16:56:29 +00:00
parent e73cade9b2
commit b07b3032c0
3 changed files with 6 additions and 1 deletions

View File

@ -76,6 +76,8 @@ Bug Fixes:
- PR#5498: Unification with an empty object only checks the absence of
the first method
- PR#5503: error when ocamlbuild is passed an absolute path as build directory
- PR#5509: misclassification of statically-allocated empty array that
falls exactly at beginning of an otherwise unused data page.
Feature wishes:
- PR#352: new option "-stdin" to make ocaml read stdin as a script

View File

@ -884,6 +884,7 @@ let end_assembly() =
add_def_symbol lbl_end;
` PUBLIC {emit_symbol lbl_end}\n`;
`{emit_symbol lbl_end} LABEL DWORD\n`;
` DWORD 0\n`;
let lbl = Compilenv.make_symbol (Some "frametable") in
add_def_symbol lbl;
` PUBLIC {emit_symbol lbl}\n`;

View File

@ -58,9 +58,11 @@ static void init_atoms(void)
caml_fatal_error("Fatal error: not enough memory for the initial page table");
for (i = 0; caml_data_segments[i].begin != 0; i++) {
/* PR#5509: we must include the zero word at end of data segment,
because pointers equal to caml_data_segments[i].end are static data. */
if (caml_page_table_add(In_static_data,
caml_data_segments[i].begin,
caml_data_segments[i].end) != 0)
caml_data_segments[i].end + sizeof(value)) != 0)
caml_fatal_error("Fatal error: not enough memory for the initial page table");
}