Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004370 [Quercus] major always 02-01-11 08:05 02-02-11 04:15
Reporter geleont View Status public  
Assigned To domdorn
Priority normal Resolution fixed Platform
Status resolved   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 4.0.14
  Product Build
Summary 0004370: file_get_contents in quercus 4.0.11 has bug.
Description Minimal code to reproduce:
<?php
file_put_contents("123", "Hello",LOCK_EX);
?>
Cause
java.lang.NullPointerException
com.caucho.quercus.lib.file.FileOutput.unlock(FileOutput.java:197)
com.caucho.quercus.lib.file.FileModule.flock(FileModule.java:1087)
com.caucho.quercus.lib.file.FileModule.file_put_contents(FileModule.java:1045)
I reviewed source code of quercus FileModule module and I am sure it happens because we close [B]os[/B], which is linked on the same object as s(BinaryOutput os = (BinaryOutput) s;) and after that we trying to make
 flock(env, (LockableStream) s, LOCK_UN, null);
on that stream.IN file_put_contents function from FileModule
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0005013)
domdorn
02-02-11 03:12

reproducible.
 
(0005014)
domdorn
02-02-11 04:15

fixed in svn-trunk, r7876.
 

- Issue History
Date Modified Username Field Change
02-01-11 08:05 geleont New Issue
02-01-11 15:00 kdecherf Issue Monitored: kdecherf
02-02-11 03:12 domdorn Note Added: 0005013
02-02-11 03:12 domdorn Assigned To  => domdorn
02-02-11 03:12 domdorn Status new => confirmed
02-02-11 04:15 domdorn Status confirmed => resolved
02-02-11 04:15 domdorn Resolution open => fixed
02-02-11 04:15 domdorn Note Added: 0005014


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
33 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker