[cpl] [Concurs] Task 1 - Analiza Statica
Alexandru Razvan Caciulescu
alexandru.razvan.c at gmail.com
Sun Jan 10 00:36:20 EET 2016
Thanks !
2016-01-09 11:46 GMT+02:00 Octavian Moraru <octmoraru at gmail.com>:
> Salut Alex,
>
> 2016-01-08 21:00 GMT+02:00 Alexandru Razvan Caciulescu via cpl
> <cpl at cursuri.cs.pub.ro>:
> > Intrebarea mea este daca se poate da un exemplu de test (macar partial)
> in
> > care acele array-uri global.ctors si global.dtors nu sunt vide si vor fi
> > populate pentru a putea testa ?
>
> Pentru a genera un astfel de exemplu, este de ajuns să incluzi <iostream>:
>
> $ cat test.cpp
> #include <iostream>
>
> int main()
> {
> std::cout << "Hello, global_ctors!";
> return 0;
> }
>
> $ clang -o test.bc -c -emit-llvm test.cpp
> $ llvm-dis < test.bc | grep global_ctors
> @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{
> i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_test.cpp,
> i8* null }]
>
> Explicația o poți citi aici [1].
>
> Destructorul pe care îl vei adăuga la partea a doua a concursului este
> de asemenea un candidat bun pentru testare.
>
> [1]
> http://llvm.org/docs/FAQ.html#what-is-this-llvm-global-ctors-and-global-i-a-stuff-that-happens-when-i-include-iostream
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/cpl/attachments/20160110/ca9c7bba/attachment.html>
More information about the cpl
mailing list