[patch #6073] Crash in browser on invalid mtimes

2007-09-17 Thread Pavel Tsekov

Update of patch #6073 (project mc):

 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[patch #6073] Crash in browser on invalid mtimes

2007-09-17 Thread Pavel Tsekov

Update of patch #6073 (project mc):

  Status:None => Done   

___

Follow-up Comment #13:

I've applied a slightly modified patch:

http://cvs.savannah.gnu.org/viewvc/mc/mc/src/util.c?r1=1.138&r2=1.139&sortby=date&diff_format=u

Thanks!


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[patch #6073] Crash in browser on invalid mtimes

2007-09-17 Thread Oswald Buddenhagen

Follow-up Comment #12, patch #6073 (project mc):

the patch is fine except for the missing translation. if somebody needs the
number for whatever reason, he can use ls.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[patch #6073] Crash in browser on invalid mtimes

2007-09-17 Thread Pavel Tsekov

Follow-up Comment #11, patch #6073 (project mc):

Any ideas ? I want to close this bug report for 4.6.2 

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[patch #6073] Crash in browser on invalid mtimes

2007-08-24 Thread Pavel Tsekov

Follow-up Comment #10, patch #6073 (project mc):

So, how shall we fix that ? Just mimic the `ls' behaviour or print something
meaningful ? I think printing the numeric value isn't the best solution since
64 bit value can display pretty big numbers and printing that out would
definitely mess the screen.


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[patch #6073] Crash in browser on invalid mtimes

2007-07-23 Thread anonymous

Follow-up Comment #9, patch #6073 (project mc):

> Hmm... Yes, I am running the test on a 32-bit version of FC6. So this means
that time_t has a different size depending on wether the application is built
for 32 bit or 64 bit system - this seems a bit strange.
It's always signed long with glibc, regardless of whether it's a 32 bit or a
64 bit system, so while it does appear a bit strange, it's nothing insane.
> Btw what does 'ls -l' output when run in the directory containing the file
with invalid time ?
See comment #3: it prints it out as an integer value.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[patch #6073] Crash in browser on invalid mtimes

2007-07-23 Thread Pavel Tsekov

Follow-up Comment #8, patch #6073 (project mc):

Hmm... Yes, I am running the test on a 32-bit version of FC6. So this means
that time_t has a different size depending on wether the application is built
for 32 bit or 64 bit system - this seems a bit strange. It seems that the
crash manifests itself on 64 bit systems only. Anyway, I'll investigate a bit
and apply either your patch or and improved version of it. I just hope that we
are not fixing a bug in the runtime library. Btw what does 'ls -l' output when
run in the directory containing the file with invalid time ?


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[patch #6073] Crash in browser on invalid mtimes

2007-07-23 Thread anonymous

Follow-up Comment #7, patch #6073 (project mc):

> So, have you actually determined that the crash happens because the library
routine localtime() fails on an invalid timestamp i.e. by running MC under gdb
?

Yes.

> Could you attach a backtrace from the crash ? I have to ask since I cannot
reproduce the crash myself. 

Here you go. This is from mc 4.6.1, completely unpatched.

> Btw I am attaching a strace of the testcase you provided. As you can see
from it no invalid date is passed to utime() - seems like perl detects the
invalid date and resets it. 

Considering you get a nicely formatted date, and strace segfaults for me (!),
I think strace is calling localtime and then strftime itself too, and perl is
doing nothing special about it. :) (Of course, I'll report this to the strace
folks.)

BTW, are you by any chance on a 32-bit system? I'm on an amd64 system, but in
an x86 chroot, I now notice I consistently get a date in 1970, just like you.

(file #13442)
___

Additional Item Attachment:



___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[patch #6073] Crash in browser on invalid mtimes

2007-07-23 Thread Pavel Tsekov

Follow-up Comment #6, patch #6073 (project mc):

So, have you actually determined that the crash happens because the library
routine localtime() fails on an invalid timestamp i.e. by running MC under
gdb ? Could you attach a backtrace from the crash ? I have to ask since I
cannot reproduce the crash myself.

Btw I am attaching a strace of the testcase you provided. As you can see from
it no invalid date is passed to utime() - seems like perl detects the invalid
date and resets it.


(file #13441)
___

Additional Item Attachment:



___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[patch #6073] Crash in browser on invalid mtimes

2007-07-20 Thread anonymous

Follow-up Comment #5, patch #6073 (project mc):

In a clean minimal FC6 install with default settings, I can get mc to crash
exactly as described. After 'yum update mc' (to 4.6.1a-36.20070124cvs), it
still crashes. After 'yum update glibc' (to 2.5-18), I get an mtime at the
end of 1969 (the default timezone is America / New York). After re-running
the perl line, mc crashes again. After rebooting, the mtime has changed back
to 1969. Re-run the perl line a third time, and mc crashes. I don't know
what's fixing the invalid mtime, but when it happens, there is no invalid
mtime for mc to see, so it makes sense that it doesn't crash.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[patch #6073] Crash in browser on invalid mtimes

2007-07-20 Thread Pavel Tsekov

Follow-up Comment #4, patch #6073 (project mc):

Ok. In my setup it doesn't crash. However ls and mc as well display a date in
1970. Maybe it depends on the filesystem settings or something. In any case
you need to provide further details about your environment. On FC6 and ext3
it doesn't crash for me with both FC mc package and MC from cvs. I followed
the instructions from your initial post to reproduce the bug.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[patch #6073] Crash in browser on invalid mtimes

2007-07-20 Thread anonymous

Follow-up Comment #3, patch #6073 (project mc):

I had tested it with mc-4.6.1, completely unpatched, before bringing it here,
and verified that the offending code was present in current CVS. I have now
tested it with mc actually checked out from cvs, and it segfaults the same
way. Both 4.6.1 and current were configured with nothing more than
./configure --prefix=$HOME/mc.

Here's what ls -l test shows:
-rw-r--r-- 1 harald users 0 4607182418800017408 test
Does it give you a valid date/time, maybe? It should be fairly obvious from
the code that strftime will be called with a null pointer if localtime fails
(if the mtime is invalid). I will test the behaviour on FC6 myself too.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[patch #6073] Crash in browser on invalid mtimes

2007-07-20 Thread Pavel Tsekov

Follow-up Comment #2, patch #6073 (project mc):

I tested both with MC from CVS and mc-4.6.1a-36.20070124cvs.fc6 from FC6 and
both behave fine. This is most likely a problem due to some Gentoo patch.
Unless you provide further details I'll close this bugreport as invalid.


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[patch #6073] Crash in browser on invalid mtimes

2007-07-05 Thread anonymous

Follow-up Comment #1, patch #6073 (project mc):

Please note, by the way, that this is just a quick patch. A slightly nicer
patch could display the numeric mtime value, or try to translate "invalid",
or something like that. I wouldn't mind trying to get it to do that, but I'm
not sure what behaviour you would prefer.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[patch #6073] Crash in browser on invalid mtimes

2007-07-05 Thread anonymous

URL:
  

 Summary: Crash in browser on invalid mtimes
 Project: GNU Midnight Commander
Submitted by: None
Submitted on: Thursday 07/05/2007 at 21:52 UTC
Category: Core
Priority: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: [EMAIL PROTECTED]
 Open/Closed: Open
 Discussion Lock: Any

___

Details:

Hi,

After

$ touch test
$ perl -e 'utime 0, 4607182418800017408, "test"'
$ mc

mc segfaults trying to display the time of file "test". I used this trivial
patch to get mc to say "(invalid)" for mtime without crashing.

It was originally reported at 



___

File Attachments:


---
Date: Thursday 07/05/2007 at 21:52 UTC  Name: mc-4.6.1-invalid-mtime.patch 
Size: 560B   By: None



___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel