minimal object.d implementation that allows classes
Steven Schveighoffer
schveiguy at yahoo.com
Thu Dec 7 15:55:20 UTC 2017
On 12/7/17 10:45 AM, Jean-Louis Leroy wrote:
> On Thursday, 7 December 2017 at 15:34:09 UTC, Steven Schveighoffer wrote:
>> On 12/7/17 10:21 AM, Jean-Louis Leroy wrote:
>>> Bar.classinfo.vtbl.ptr[Bar.classinfo.vtbl.length] = cast(void*)
>>> 0x123456;
>>
>> This is a buffer overflow, why are you doing this specifically?
>>
>> -Steve
>
> It's not an overflow because of the call to `reserve`. It is part of an
> experiment related to supporting user-defined per-class metadata by
> extending the vtable.
Ah, ok.
Take care, I'm not sure that the classinfo instances are scanned by the
GC. Might be better to use C malloc.
-Steve
More information about the Digitalmars-d
mailing list