Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#360 closed defect (fixed)

Path rewriter affected paths cause crashes in forked child

Reported by: dmik Owned by:
Priority: normal Milestone: new
Component: libc Version: 0.6.6
Severity: normal Keywords:
Cc: steve53@…

Description

Involving paths registered in the kLIBC path rewriter causes a crash when doing mkstemp in the forked child (the test case attached). If I use open instead of mkstemp, then the program doesn't crash but instead creates a file in a wrong location.

In the test case I use paths starting with /tmp which is mapped to %TMP% (which is set to D:\Temp). In case of open the file is created in D:\ instead of D:\Temp. I also experience similar troubles with other rewriter paths.

Note that if execute the same mkstemp or open from the parent process, all works as it should.

Attachments (1)

test.c (752 bytes ) - added by dmik 8 years ago.

Download all attachments as: .zip

Change History (7)

by dmik, 8 years ago

Attachment: test.c added

comment:1 by dmik, 8 years ago

Somehow the path rewriter table is not operable in the beginning of the forked child.

comment:2 by Steven Levine, 8 years ago

Cc: steve53@… added

This ticket duplicates #190. Knut's suggestion at the time was to rewrite the non-WPS part of the the path rewriter DLL to be fork friendly. Unfortunately, the original sources were lost/deleted.

comment:3 by dmik, 8 years ago

Thanks Steve. Looks like we have to rewrite the path rewriter DLL completely.

comment:4 by Steven Levine, 7 years ago

ARCAOS 5.x ships with a rewritten path rewriter (prewrite.dll) which resolves this issue.

comment:5 by Steven Levine, 7 years ago

Resolution: fixed
Status: newclosed

comment:6 by Silvan Scherrer, 7 years ago

and what about the non ArcaOS users? How can they install the fixed pathrewriter?

Note: See TracTickets for help on using tickets.