Bug 189871

Summary: javascript memory leak, possible crash
Product: [Applications] konqueror Reporter: lunter <lunter>
Component: kjsAssignee: Konqueror Bugs <konqueror-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: crash CC: Ch.Ehrlicher, justin.zobel
Priority: NOR    
Version First Reported In: 4.2.2   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: source

Description lunter 2009-04-17 13:43:44 UTC
Version:           4.2.2 (using KDE 4.2.2)
OS:                MS Windows
Installed from:    MS Windows

Memory leak<br><br>

1. Run with Konqueror (windows xp sp3)<br>
   Browser memory usage increase very fast (proportional to time) to 1.5GB<br><br>

2. Run with IE or Opera<br>
   Constant browser memory usage<br>


<script>

 x=[]
 z=100000;while(z--)x.push([])

 function run(){
  var a,b,c,d,e,f,g,h,n
  n=5000;while(n--){
   a=[]
   b=[]
   c=[]
   d=[]
   e=[]
   f=[]
   g=[]
   h=[]
  }
  setTimeout(function(){run()},0)
 }

 run()

</script>
Comment 1 lunter 2009-04-17 13:44:12 UTC
Created attachment 32886 [details]
source
Comment 2 Maksim Orlovich 2009-04-17 18:56:53 UTC
Can't confirm... Which is bad, since I don't think I could ask our nice Windows-port people to debug the GC...
Comment 3 Christian Ehrlicher 2009-04-19 12:12:39 UTC
I tried with msvc, svnHEAD and can confirm the bug.
Also happens with mingw on kde4.2.2 so it's not a msvc-specific bug :(

Any ideas how to find this bug? Does a backtrace help?
Comment 4 Maksim Orlovich 2009-04-19 18:10:32 UTC
If there is something unusual, perhaps (especially if you have 100% CPU usage)

Other things to check:
1) Whether the stack boundaries passed to markStackObjectsConservatively are correct. Detection is platform specific, so may be wrong (but then it'd likely leak just about everywhere)
2) Beyond that... well, about the only thing one can do is get a backtrace of every single invocation of JSObject::mark...
Comment 5 Justin Zobel 2020-12-03 21:55:52 UTC
Thank you for the report.

As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved.

I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved/worksforme" when you respond, thank you.
Comment 6 Bug Janitor Service 2020-12-18 04:34:48 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Bug Janitor Service 2021-01-02 04:34:21 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!