Skip to content

Instantly share code, notes, and snippets.

View gahr's full-sized avatar
💭

Pietro Cerutti gahr

💭
  • Bloomberg LP
  • Switzerland
View GitHub Profile
=================================================================
==37535==ERROR: AddressSanitizer: heap-use-after-free on address 0x607000001238 at pc 0x00000052a8c6 bp 0x7fffffff6130 sp 0x7fffffff6128
READ of size 8 at 0x607000001238 thread T0
#0 0x52a8c5 in index_shared_data_set_context /usr/home/gahr/github/neomutt/index/shared_data.c:194:47
#1 0x52135f in change_folder_mailbox /usr/home/gahr/github/neomutt/index/dlg_index.c:746:5
#2 0x521cdd in change_folder_string /usr/home/gahr/github/neomutt/index/dlg_index.c:848:3
#3 0x50be81 in mutt_index_menu /usr/home/gahr/github/neomutt/index/dlg_index.c:2522:11
#4 0x4706e9 in main /usr/home/gahr/github/neomutt/main.c:1261:7
0x607000001238 is located 40 bytes inside of 80-byte region [0x607000001210,0x607000001260)

sort_thread="reverse-date" sort_aux="date"

 117  ⤷    4        [Jun 18 21 00:46]  Richard Russon                       hash: fix crash on element deletion (#2974)                                              
 121  ⤷    2    C   [Jun 17 21 12:36]  Richard Russon                       Re: Draft not deleted after recall (#2959)                                               
 123  ⤷    7        [Jun 17 21 21:02]  Eric Blake                           failure to sync notmuch database when files moved between maildirs behind neomutt's back
 130  (7.2K)        [Jun 17 21 15:32]  Eric Blake                           allow windowed notmuch queries to include additional messages, jump back to present (#297
diff --git a/conn/socket.c b/conn/socket.c
index 0311e61ee..da4a7a615 100644
--- a/conn/socket.c
+++ b/conn/socket.c
@@ -36,6 +36,7 @@
#include "mutt/lib.h"
#include "config/lib.h"
#include "core/lib.h"
+#include "mutt_globals.h"
#include "socket.h"
static int handle_changes(struct IndexSharedData *shared,
struct IndexPrivateData *priv)
{
menu_queue_redraw(priv->menu, MENU_REDRAW_STATUS);
const bool c_resolve = cs_subset_bool(shared->sub, "resolve");
if (!priv->tag && c_resolve)
{
const int index = ci_next_undeleted(shared->mailbox, menu_get_index(priv->menu));
if (index != -1)
I'm implementing a vtable module.
In `xColumn`, I call `sqlite3_result_*` to produce the value, but I also have additional metadata about the value (say, a `void*`) that I need to make available to the callback passed to `sqlite3_exec`.
The problem is that the only state I have (4th arg to `sqlite3_exec`, then 1st arg to callback), is not available when `xColumn` is called. And whatever state I might have in `xColumn` is not available at callback time.
Is there a preferred way to make some state (e.g., the one I have at `sqlite3_exec` time) available at `xColumn` time?

FEATURES

  • Allow <sync-mailbox> to fail quietly
  • compose: add $greeting - a welcome message on top of emails
  • config: allow += modification of my_ variables
  • hooks: allow a -noregex param to folder and mbox hooks
  • imap, smtp: add support for authenticating using XOAUTH2
  • imap: speed up server-side searches
  • mailcap: implement x-neomutt-nowrap flag
│12172│INBOX │-*-NeoMutt: +INBOX [2007M - Msgs:12172 2237M]---(reverse-last-date/date)--------------------------------------------------(0%)----
1 +INBOX
2 2 +AAA-ToRead
3 +Bandcamp
4 +CeDe
5 +Discogs
6 +Drafts
18 +FreeBSD.@tcltk
19 2 +Junk
20 +LinkedIn
21 +Lists
2│ 3│Junk │---NeoMutt: +INBOX [2237M - Msgs:12172 2237M]---(reverse-last-date/date)-----------------------------------(0%)----
## Original mailbox view
```
5 (8.9K) N [Dec 29 21 15:35] Andriy Gapon gmirror: read failed when one disk (of two) failed
6 (8.4K) O [Dec 19 21 11:09] FreeBSD User Arduino IDF -> make/automake based environment
7 (6.6K) O [Dec 19 21 15:07] Dmitry Salychev via freebsd-embedde ├─>
8 (5.9K) O [Dec 20 21 13:35] Marc Fonvieille └─>
9 (7.3K) O [Dec 21 21 10:46] FreeBSD User ├─>
10 (8.8K) N [Dec 28 21 23:25] FreeBSD User └─>
#define a_capo "\n"
#define buttaci <<
#define chicchessia auto
#define fine ;
#define i_dati_di data
#define incrementa(cosa) ++(cosa)
#define intero int
#define invariabile const
#define invariabili const
#define lettera char