Opened 8 years ago

Closed 6 years ago

Last modified 6 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)

Changed 8 years ago by dmik

Attachment: test.c added

comment:1 Changed 8 years ago by dmik

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

comment:2 Changed 8 years ago by Steven Levine

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 Changed 8 years ago by dmik

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

comment:4 Changed 7 years ago by Steven Levine

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

comment:5 Changed 6 years ago by Steven Levine

Resolution: fixed
Status: newclosed

comment:6 Changed 6 years ago by Silvan Scherrer

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

Note: See TracTickets for help on using tickets.