glsl: Avoid ralloc_stealing a long-lived object to a short-lived parent
glsl: Avoid ralloc_stealing a long-lived object to a short-lived parent

In commit 6ecee54a9aecc120cb68b02f7e14dcac86b9eca2 a call to
talloc_reference was replaced with a call to talloc_steal. This was in
preparation for moving to ralloc which doesn't support reference
counting.

The justification for talloc_steal within token_list_append in that
commit is that the tokens are being copied already. But the copies are
shallow, so this does not work.

Fortunately, the lifetime of these tokens is easy to understand. A
token list for "replacements" is created and stored in a hash table
when a function-like macro is defined. This list will live until the
macro is #undefed (if ever).

Meanwhile, a shallow copy of the list is created when the macro is
used and the list expanded. This copy is short-lived, so is unsuitable
as a new parent.

So we can just let the original, longer-lived owner continue to own
the underlying objects and things will work.

This fixes bug #45082:

	"ralloc.c:78: get_header: Assertion `info->canary == 0x5A1106'
	failed." when using a macro in GLSL
	https://bugs.freedesktop.org/show_bug.cgi?id=45082

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

NOTE: This is a candidate for stable release branches.

tokyovigilante/glsl-optimizer,zz85/glsl-optimizer,dellis1972/glsl-optimizer,dellis1972/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,bkaradzic/glsl-optimizer,bkaradzic/glsl-optimizer,mcanthony/glsl-optimizer,tokyovigilante/glsl-optimizer,djreep81/glsl-optimizer,wolf96/glsl-optimizer,tokyovigilante/glsl-optimizer,metora/MesaGLSLCompiler,benaadams/glsl-optimizer,dellis1972/glsl-optimizer,mapbox/glsl-optimizer,wolf96/glsl-optimizer,wolf96/glsl-optimizer,mapbox/glsl-optimizer,dellis1972/glsl-optimizer,mcanthony/glsl-optimizer,wolf96/glsl-optimizer,jbarczak/glsl-optimizer,mcanthony/glsl-optimizer,mapbox/glsl-optimizer,mapbox/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,wolf96/glsl-optimizer,bkaradzic/glsl-optimizer,djreep81/glsl-optimizer,zz85/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,zeux/glsl-optimizer,bkaradzic/glsl-optimizer,metora/MesaGLSLCompiler,zz85/glsl-optimizer,benaadams/glsl-optimizer,mapbox/glsl-optimizer,djreep81/glsl-optimizer,zz85/glsl-optimizer,dellis1972/glsl-optimizer,metora/MesaGLSLCompiler,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,zz85/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer