[Cuis-dev] [DEFECT] De-compling code uses #storeOn:
Andres Valloud
ten at smallinteger.com
Fri Dec 10 11:25:30 PST 2021
There's also the argument rightly complaining that literals should not
be variable --- otherwise, even if somebody gives you source code, well,
what does it do, what does it mean, and why does merely "loading the
program" trigger undefined behavior?
On 12/10/21 7:22 AM, Gerald Klix via Cuis-dev wrote:
> Hi all, Hi Juan,
>
> There is a defect in de-compiling code.
> After de-compiling the resulting method node
> is pretty printed. Constants defined with
> a back-tick are "printed" by using #storeOn:,
> which -- IHMO -- is dangerous as this
> example method source proves:
>
> --- snip ---
> boom
> "Decompile me ..."
>
> ^ `Smalltalk asDictionary` size
> --- snap ---
>
> The problem got much worse, when #linesOfCode
> was based on #decompiledString.
> Just selecting a package containing such a
> method in the package browser
> will cause the VM or the OS to run out of memory.
>
> I think we need something like #printDecompiledOn:
> which should do something sensible,
> like sending #store: but limiting
> the output size.
>
>
> Best Regards,
>
> Gerald
More information about the Cuis-dev
mailing list