weston/shared
Pekka Paalanen 9229a45116 shared: rewrite fail_on_null() as abort_oom_if_null()
Recently I learnt that fprintf() is not async-signal-safe. Maybe it also
attempts to allocate memory sometimes. Hence, using it when we
presumably are out of memory is wishful thinking.

Therefore replace that with async-signal-safe code. If you have to check
pointers from traditional signal handlers, now you could do that too!

While doing this, we also lose the string formatting for line number. I
would argue that printing file and line number is not that useful, if
the system really is out of memory. If not out of memory, a core dump
would give us much more detailed information about what went wrong.

clients/window.c had some calls to fail_on_null() and these are simply
replaced. They were used for checking that creating new wl_proxy by
issuing a protocol request worked, and IIRC that only fails on
out-of-memory, so the same rationale applies here.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2022-07-20 12:44:12 +03:00
..
cairo-util.c cairo-util: Clean up more Cairo detritus; almost all of it 2022-06-29 14:33:21 +01:00
cairo-util.h cairo-util: Clean up more Cairo detritus; almost all of it 2022-06-29 14:33:21 +01:00
config-parser.c tests: Use memstream for config-parser test 2022-07-05 10:15:49 +01:00
fd-util.h libweston: Support zwp_surface_synchronization_v1.set_acquire_fence 2019-02-06 12:21:56 +00:00
file-util.c clients: Fix/resolved doxygen warnings 2019-06-25 14:05:54 +00:00
file-util.h file-util: allow specifying path separately in file_create_dated() 2018-02-09 15:16:07 +00:00
frame.c shared/frame: Provide a function to get decoration sizes and use it 2022-06-22 12:04:06 -05:00
helpers.h shared: add WESTON_EXPORT_FOR_TESTS 2022-03-01 13:32:15 +00:00
image-loader.c image-loader: Fix undefined left shift in premultiply_data 2019-10-16 16:06:06 -04:00
image-loader.h shared: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-15 13:04:18 -07:00
matrix.c libweston: remove UNIT_TEST 2022-05-31 12:26:09 +00:00
meson.build process-util: Move Xwayland fork helpers to shared 2022-07-19 14:12:37 +00:00
option-parser.c option-parser: Make bools boolean 2019-11-28 19:24:13 +00:00
os-compatibility.c shared: introduce os_fd_clear_cloexec() 2022-07-12 08:30:22 +00:00
os-compatibility.h shared: introduce os_fd_clear_cloexec() 2022-07-12 08:30:22 +00:00
platform.h Fix indentation all through the project 2021-07-31 15:28:20 +00:00
process-util.c custom-env: Add helper to parse combined env/arg strings 2022-07-19 14:12:37 +00:00
process-util.h custom-env: Add helper to parse combined env/arg strings 2022-07-19 14:12:37 +00:00
signal.c libweston: Introduce a safer wayland signal emission 2021-12-14 17:55:06 +00:00
signal.h libweston: Introduce a safer wayland signal emission 2021-12-14 17:55:06 +00:00
string-helpers.h gl_renderer: print more GL ES feature flags 2022-05-18 14:18:53 +03:00
timespec-util.h timespec: Don't return value from void function 2019-06-11 11:31:04 +01:00
weston-drm-fourcc.h gl-renderer: add support for (a|x)bgr16161616 shm formats 2022-02-02 11:58:58 +00:00
weston-egl-ext.h gl-renderer: query DRM device given an EGLDisplay 2021-11-25 10:47:39 -03:00
xalloc.h shared: rewrite fail_on_null() as abort_oom_if_null() 2022-07-20 12:44:12 +03:00
xcb-xwayland.c shared/xcb-xwayland: Add missing atoms 2022-06-23 14:13:41 +00:00
xcb-xwayland.h xwayland/window-manager: Add support for _NET_FRAME_EXTENTS 2022-06-22 12:05:23 -05:00