Re: [RFC PATCH v2 02/17] objtool: Create disassembly context

From: Josh Poimboeuf

Date: Tue Sep 23 2025 - 18:23:54 EST


On Thu, Jun 19, 2025 at 04:56:44PM +0200, Alexandre Chartre wrote:
> +struct disas_context *disas_context_create(struct objtool_file *file)
> +{
> + struct disas_context *dctx;
> +
> + dctx = malloc(sizeof(*dctx));
> + if (!dctx) {
> + ERROR_GLIBC("failed to allocate disassembly context");
> + return NULL;
> + }

Since this isn't a fatal error, it should probably be WARN_GLIBC() or so.

--
Josh