Euphoria Ticket #796: programs fail to compile after translation due to permission error.

Sometimes when eutest runs interpreter, binder and translator, the compilation fails with a permission error when it tries to write the final binary. If eutest runs 'interpreter' and 'translator'. No problem. If it runs 'interpreter' and 'binder'. No problem.

The error looks like the following:

translating t_net_http.e:c:/progra~1/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot 
 open output file c:/Users/Shawn/DOCUME~1/DEVELO~1/hg/silver/tests/T_NET_~1.EXE: Permission denied 
collect2: ld returned 1 exit status 
Unable to link c:\Users\Shawn\Documents\development\hg\silver\tests\t_net_http.exe 
Status: 1 Command: gcc -o c:/Users/Shawn/DOCUME~1/DEVELO~1/hg/silver/tests/T_NET_~1.EXE  init-.o t_net_http.o 
main-.o unittest.o console.o get.o machine.o memconst.o memory.o dll.o types.o text.o convert.o search.o files 
ys.o datetime.o math.o rand.o sequence.o sort.o pretty.o map.o eumem.o primes.o info.o http.o base64.o socket. 
o common.o regex.o dns.o url.o os.o  c:/Users/Shawn/DOCUME~1/DEVELO~1/hg/silver/BUILD-~2/eu.a -m32 
FAILURE: t_net_http program died with status -1 
 
Test results summary: 
    FAIL: translated t_net_http.exe 
Files (run: 3) (failed: 1) (67% success) 

The three tests being the interpreter, binder and translator.

Hypothesis: I think there is a race condition. The O.S. marks the EXE file made by the binder as being read and exec only while it is being run. However, after the O.S. finishes it takes its time in allowing the file to be later written to again. By the time the translator runs the linker, normally the O.S. has marked this as writable. In t_net_http.e it seems the translation is too fast for the OS.

Details

Type: Bug Report Severity: Normal Category: Bundled Utility
Assigned To: unknown Status: Fixed Reported Release:
Fixed in SVN #: View VCS: none Milestone: 4.0.5

1. Comment by SDPringle Oct 09, 2012

See: hg:euphoria/rev/106130b81ec7

changeset: 5733:106130b81ec7 branch: 4.0 parent: 5724:fa9283baa75e user: Shawn Pringle <shawn.pringle@gmail.com> date: Sun Oct 07 09:57:07 2012 -0300 files: docs/release/4.0.5.txt source/eutest.ex description:

  • use distinct EXE filenames when binding and translating.
  • fixes ticket 796

2. Comment by SDPringle Nov 07, 2012

See: hg:euphoria/rev/ca321f5c80c2

changeset: 5815:ca321f5c80c2 parent: 5732:ddf4da63bf35 user: Shawn Pringle <shawn.pringle@gmail.com> date: Mon Nov 05 09:20:03 2012 -0300 files: source/eutest.ex description:

  • remerged filename changes use: testname-bound.exe and testname-translated.exe
  • see ticket 796

Search



Quick Links

User menu

Not signed in.

Misc Menu