bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-readline] _rl_search_cxt may look different to different compilatio


From: Benjamin Peterson
Subject: [Bug-readline] _rl_search_cxt may look different to different compilation units
Date: Wed, 25 Oct 2017 22:21:02 -0700

The layout of the _rl_search_cxt struct, defined in rlprivate.h, depends on
whether HANDLE_MULTIBYTE is defined when the struct is defined. Since
rlprivate.h doesn't include rlmbutil.h, the header responsible for defining or
not defining HANDLE_MULTIBYTE, the layout of _rl_search_cxt will depend on
whether the translation unit has included rlmbutil.h before it includes
rlprivate.h.

In particular, callback.c doesn't include rlmbutil.h but uses references
variables of type _rl_search_cxt. This could easily be problematic in the
future.

A patch to bandaid the current issue follows, but a more systematic fix like
including rlmbutil.h in rlprivate.h is probably better.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]