Re: Crash on large brace expansion

2021-07-15 Thread Dale R. Worley
Gabríel Arthúr Pétursson writes: > Executing the following results in a fierce crash: > >$ bash -c '{0..255}.{0..255}.{0..255}.{0..255}' >malloc(): unaligned fastbin chunk detected 2 >Aborted (core dumped) As others have noted, you are attempting to construct 2^32 words. Now it's

Re: Crash on large brace expansion

2021-07-15 Thread Léa Gris
Le 15/07/2021 à 21:23, Greg Wooledge écrivait : On Thu, Jul 15, 2021 at 05:28:04PM +0200, Léa Gris wrote: Le 15/07/2021 à 16:36, Gabríel Arthúr Pétursson écrivait : Hi all, Executing the following results in a fierce crash: $ bash -c '{0..255}.{0..255}.{0..255}.{0..255}' Brace

Re: Crash on large brace expansion

2021-07-15 Thread Chet Ramey
On 7/15/21 10:36 AM, Gabríel Arthúr Pétursson wrote: Hi all, Executing the following results in a fierce crash: $ bash -c '{0..255}.{0..255}.{0..255}.{0..255}' malloc(): unaligned fastbin chunk detected 2 Aborted (core dumped) If the Oom killer doesn't get you first. -- ``The

Re: Crash on large brace expansion

2021-07-15 Thread Greg Wooledge
On Thu, Jul 15, 2021 at 05:28:04PM +0200, Léa Gris wrote: > Le 15/07/2021 à 16:36, Gabríel Arthúr Pétursson écrivait : > > Hi all, > > > > Executing the following results in a fierce crash: > > > > $ bash -c '{0..255}.{0..255}.{0..255}.{0..255}' > > Brace expression expands all the value in

Re: Crash on large brace expansion

2021-07-15 Thread Léa Gris
Le 15/07/2021 à 16:36, Gabríel Arthúr Pétursson écrivait : Hi all, Executing the following results in a fierce crash: $ bash -c '{0..255}.{0..255}.{0..255}.{0..255}' Brace expression expands all the value in memory. Here you are actually telling Bash to expand 256⁴ or 4294967296 42

Crash on large brace expansion

2021-07-15 Thread Gabríel Arthúr Pétursson
Hi all, Executing the following results in a fierce crash: $ bash -c '{0..255}.{0..255}.{0..255}.{0..255}' malloc(): unaligned fastbin chunk detected 2 Aborted (core dumped) Backtrace: #0 0x7f8999dd22a2 in raise () from /lib64/libc.so.6 #1 0x7f8999dbb8a4 in abort ()