exa: Panic when `--long` is used

# exa v0.8.0

$ RUST_BACKTRACE=1 exa -l
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /build/rust/src/rustc-1.33.0-src/src/libcore/slice/mod.rs:2455:10
stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: __libc_start_main
  14: <unknown>
Aborted (core dumped)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 36
  • Comments: 27 (3 by maintainers)

Commits related to this issue

Most upvoted comments

The crash is triggered by the update to tzdata 2019b. Rolling back to 2019a avoids it.

The PR for zoneinfo-compiled linked above (https://github.com/rust-datetime/zoneinfo-compiled/pull/8) contains the relevant fix!

I could reproduce the crash with the uploaded Sydney and /etc/localtime files (thanks for all of those). After building again with the new version of zoneinfo-compiled, it doesn’t crash anymore.

If don’t want to downgrade, you may want to give lsd a try.

It fails for every timezone

from pytz import all_timezones
from re import match
from os import system


for tz in filter(lambda x: match(r'^[a-zA-Z/]+$', x), all_timezones):
    system('TZ=%s exa -l 2>/dev/null' % tz)

I’m having the same issue, if it’s useful, my timezone is America/Lima, using ArchLinux This is that I get while running exa -l and as the error message said, running with RUST_BACKTRACE=1 too

 exa -l
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /build/rust/src/rustc-1.33.0-src/src/libcore/slice/mod.rs:2455:10
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[1]    7616 abort (core dumped)  exa -l

 export RUST_BACKTRACE=1                                                                                                             

 exa -l
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /build/rust/src/rustc-1.33.0-src/src/libcore/slice/mod.rs:2455:10
stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: __libc_start_main
  14: <unknown>
[1]    7916 abort (core dumped)  exa -l

This seems to happen with only some specific timezone (exa read them from /etc/localtime). On my side Asia/Tokyo and America/Los_angeles work just fine, but Asia/Shanghai and Asia/Hong_kong will cause the panic.

Same here: America/Sao_Paulo

I believe I’m getting the same error with the Pacific/Auckland timezone and Exa 0.8.0 on Arch Linux.

This is affecting all my systems, across different timezones.

Happening here too with Australia/Sydney.