git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git column fails (or crashes) if padding is negative

From
Kristoffer Haugsbakk <code@khaugsbakk.name>
Date
Feb 9, 2024, 16:27 UTC
Message-ID
<571fb353-af1d-4cc9-a2c2-197296685623@app.fastmail.com>
In-Reply-To
<AS8P189MB21977ACC4866D9836DA29082BC4B2@AS8P189MB2197.EURP189.PROD.OUTLOOK.COM>
Hi
I wasn’t able to reproduce quite what you got but kind of the same.

``` $ seq 1 24 | git column --mode=column --padding=-1 12345678910<binary?><numbers> $ seq 1 24 | git column --mode=column --padding=-3 fatal: Data too large to fit into virtual memory space. $ seq 1 24 | git column --mode=column --padding=-5 fatal: Out of memory, malloc failed (tried to allocate 18446744073709551614 bytes) ```

This is an “Internal helper command” under the “plumbing” suite. And I get the impression that sometimes these fallthroughs are treated as “don’t do that”. But I don’t know.

On the other hand it failing inside malloc looks weird. Why not catch this before the malloc call is made?

[System Info] git version: git version 2.43.0 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Linux 6.5.0-17-generic #17~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 16 14:32:32 UTC 2 x86_64 compiler info: gnuc: 11.4 libc info: glibc: 2.35 $SHELL (typically, interactive shell): /bin/bash

[Enabled Hooks]
-- 
Kristoffer Haugsbakk
Previous: Tiago PascoalNext: Junio C Hamano
Message 2 of 32 in “git column fails (or crashes) if padding is negative”
  1. Tiago PascoalFeb 9, 2024
  2. Kristoffer HaugsbakkFeb 9, 2024
  3. Junio C HamanoFeb 9, 2024
  4. Kristoffer HaugsbakkFeb 11, 2024
  5. Junio C HamanoFeb 12, 2024
  6. column: disallow negative paddingKristoffer Haugsbakk, Feb 9, 2024
  7. Kristoffer HaugsbakkFeb 9, 2024
  8. Chris TorekFeb 10, 2024
  9. Kristoffer HaugsbakkFeb 11, 2024
  10. Junio C HamanoFeb 11, 2024
  11. Kristoffer HaugsbakkFeb 11, 2024
  12. column: disallow negative paddingKristoffer Haugsbakk, Feb 11, 2024
  13. Rubén JustoFeb 11, 2024
  14. Rubén JustoFeb 11, 2024
  15. Kristoffer HaugsbakkFeb 12, 2024
  16. Kristoffer HaugsbakkFeb 12, 2024
  17. Rubén JustoFeb 12, 2024
  18. 0/2 column: disallow negative paddingKristoffer Haugsbakk, Feb 13, 2024
  19. 1/2 column: disallow negative paddingKristoffer Haugsbakk, Feb 13, 2024
  20. 2/2 column: guard against negative paddingKristoffer Haugsbakk, Feb 13, 2024
  21. Junio C HamanoFeb 13, 2024
  22. Rubén JustoFeb 13, 2024
  23. Junio C HamanoFeb 13, 2024
  24. Rubén JustoFeb 13, 2024
  25. Kristoffer HaugsbakkFeb 13, 2024
  26. Junio C HamanoFeb 13, 2024
  27. Rubén JustoFeb 13, 2024
  28. tag: error when git-column failsRubén Justo, Feb 13, 2024
  29. Junio C HamanoFeb 14, 2024
  30. Rubén JustoFeb 13, 2024
  31. Kristoffer HaugsbakkFeb 13, 2024
  32. Junio C HamanoFeb 13, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.