Bug 124611 - [sal][MSVC] Wrong global variable initialization order
Summary: [sal][MSVC] Wrong global variable initialization order
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected)
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Dev-related
  Show dependency treegraph
Reported: 2019-04-08 14:40 UTC by Egor Pugin
Modified: 2021-08-09 20:39 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Egor Pugin 2019-04-08 14:40:47 UTC
(sal/rtl/strimp.cxx) rtl_allocateStringFn rtl_allocateString = malloc; is initialized after const OUString BACKSLASH ("\\"); (sal/osl/w32/path_helper.cxx), so it calls 0 address during dll initialization.

Steps to Reproduce:
I'm doing custom builds (not wiki workflow) on VS2019.
So, the first target to build is sal, then codemaker and it does not start because of this issue.

Actual Results:
Error during globals initialization by CRT (before main call).

Expected Results:
Must work.

Reproducible: Always

User Profile Reset: No

Additional Info:
Comment 1 Xisco Faulí 2019-04-09 09:07:23 UTC
Since this is build issue and not a software issue, would you mind sending an
email to the dev list instead? ->
Comment 2 Egor Pugin 2019-04-09 22:21:34 UTC
See possible fix https://gerrit.libreoffice.org/#/c/70483/
Comment 3 Xisco Faulí 2019-04-12 10:34:30 UTC
ok, assigning it to you. Thanks for the patch ;-)
Comment 4 Xisco Faulí 2019-07-18 11:43:31 UTC
Patch restored in gerrit
Comment 5 Xisco Faulí 2019-11-21 12:40:43 UTC
Hi Egor,
Are you still working on this issue? Please see comment from 2019-04-11 in https://gerrit.libreoffice.org/#/c/70483/.
Setting to NEEDINFO meanwhile
Comment 6 Egor Pugin 2019-11-21 12:44:09 UTC

No, I'm not working on this, don't have enough time.
Bug is reported, you know about it.
Code owners should know how to fix this better.
Comment 7 Xisco Faulí 2019-11-21 12:48:21 UTC
Code is 30 years old. difficult to tell who is the code owner...