ELF | Flexible Platform for Game Research | Reinforcement Learning library

 by   facebookresearch C++ Version: Current License: Non-SPDX

kandi X-RAY | ELF Summary

kandi X-RAY | ELF Summary

ELF is a C++ library typically used in Artificial Intelligence, Reinforcement Learning applications. ELF has no bugs, it has no vulnerabilities and it has medium support. However ELF has a Non-SPDX License. You can download it from GitHub.

C compiler with C11 support (e.g., gcc >= 4.9) is required. The following libraries are required tbb. CMake >=3.8 is also required. Python 3.x is required. In addition, you need to install following package: [PyTorch] version 0.2.0+, tqdm, zmq, msgpack, msgpack_numpy.

            kandi-support Support

              ELF has a medium active ecosystem.
              It has 2085 star(s) with 297 fork(s). There are 125 watchers for this library.
              It had no major release in the last 6 months.
              There are 37 open issues and 53 have been closed. On average issues are closed in 46 days. There are 10 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of ELF is current.

            kandi-Quality Quality

              ELF has no bugs reported.

            kandi-Security Security

              ELF has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              ELF has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              ELF releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ELF
            Get all kandi verified functions for this library.

            ELF Key Features

            No Key Features are available at this moment for ELF.

            ELF Examples and Code Snippets

            copy iconCopy
              public String toString() {
                return "The elf blacksmith";

            Community Discussions


            Problem with sending data from userspace to bpf program with maps
            Asked 2021-Jun-15 at 07:28

            I have problem with my bpf program. I getting error while loading this program. my bpf program is:



            Answered 2021-Jun-15 at 07:28

            TL;DR. You should check that the pointer returned by bpf_map_lookup_elem is not NULL.

            With the following logs, the BPF verifier is telling you that, when it reaches the dereference of my_pid, the pointer may still have a NULL value. It thus contains a map value or a NULL value, i.e., map_value_or_null.

            Source https://stackoverflow.com/questions/67980932


            why "A stack overflow in task iot_thread has been detected" is coming continuously?
            Asked 2021-Jun-14 at 22:09

            I'm working on an aws/amazon-freertos project. In there I found some unusual error "A stack overflow in task iot_thread has been detected".

            Many time I got this error and somehow I managed to remove it by changing the code.

            I just want to know what this error means actually?

            As per what I know, it simply means that the iot_thread ask stack size is not sufficient. So it's getting overflow.

            Is this the only reason why this error comes or can there be another reason for this?

            If yes then where should I increase the stack size of the iot_thread task?

            Full Log:



            Answered 2021-Jun-14 at 22:05

            It simply means that the iot_thread ask stack size is not sufficient. [...] Is this the only reason why this error comes or can there be another reason for this?

            Either it is insufficient you your stack usage is excessive (due to recursion error or instantiation of instantiation of large objects or arrays. Either way the cause is the same. Whether it is due insufficient stack or excessive stack usage is a matter of design an intent.

            If yes then where should I increase the stack size of the iot_thread task?

            The stack for a thread is assigned in the task creation function. For a dynamically allocated stack that would be the xTaskCreate() call usStackDepth parameter:

            Source https://stackoverflow.com/questions/67970388


            In function `_main_entry' undefined reference to `main'
            Asked 2021-Jun-13 at 18:02

            Here is my problem, I build an archive with "xc32-ar.exe" with this command line.



            Answered 2021-Jun-13 at 18:02

            Is it possible to do this?

            Yes: add -u main to your link line.

            To understand what's wrong with your command line, read this or this.

            Source https://stackoverflow.com/questions/67939022


            Find out where rop gadgets are actually loaded in memory using Ropper
            Asked 2021-Jun-13 at 14:57

            I am studying ROP on Arm64, I posted my thread here Return Oriented Programming on ARM (64-bit)

            However a new/separate issue about choosing rop gadgets has arisen which requires the opening of a new thread. So to sum up i am studying ROP vulnerability on ARM 64 bit and i am trying to test it using a very simple c code (attached to the previous thread). I'am using ropper tool in order to search for gadgets to build my rop chain. But when i overflow the pc with the address of the gadget i got this within gdb:



            Answered 2021-Jun-13 at 14:57

            Your gadget is at 0x55555558f8.

            Ropper shows the addresses of gadgets the way the ELF header describes the memory layout of the binary. According to that header:

            • The file contents 0x0-0xadc are to be mapped as r-x at address 0x0.
            • The file contents 0xdb8-0x1048 are to be mapped as rw- at address 0x10db8.

            Account for page boundaries and you get one page mapping file offset 0x0 to address 0x0 as executable and two pages mapping file offset 0x0 to address 0x10000 as writeable.

            From your GDB dump, these mappings are created at 0x5555555000 and 0x5555565000 in the live process, respectively.

            Source https://stackoverflow.com/questions/67953651


            Is GCC inline asm goto supported in the m68k-elf target?
            Asked 2021-Jun-10 at 19:40

            I'm working on a project with lots of C wrappers around M68000 asm calls. A few of these calls return a success/fail status on the condition code register, so it would be ideal to 'goto' a C label depending on the status of CC. However, no matter what permutations I try, I am constantly getting syntax errors from the compiler.

            (This is gcc 10.2.0 --with-cpu=​m68000)

            Example code:



            Answered 2021-Jun-10 at 19:40

            Yes, it is supported. I think the problem is your code, which has a couple of errors:

            1. To use the goto feature, you need to start the inline assembly statement with the asm goto keywords. You are missing the goto.

            2. The label operands are numbered sequentially after the input operands (and of course there cannot be outputs). So failed is operand 4, and therefore you need to refer to it with bcc %l4, not %l0.

            With these changes I'm able to compile the code.

            By the way, I don't know much about m68k assembly, but it looks like you are clobbering register d1, along with whatever the _BURAM subroutine clobbers, yet those have not been declared as clobbers. Shouldn't you add "d1" and the rest along with "cc"?

            Also, it seems like maybe you are expecting the operands d0_fcode, a0_info, etc, to be put in those specific registers, presumably because _BURAM expects them there. Do you have those variables defined register asm to tell the compiler about that, e.g. register int d0_fcode asm("d0");? Otherwise it could for instance choose d4 for the d0_fcode operand. In my test it happens by chance that they get put in the desired registers, without explicitly asking, but that is not safe to rely on.

            Source https://stackoverflow.com/questions/67923847


            Unable to install JDK 16 on RPi
            Asked 2021-Jun-10 at 15:46

            I want to install the JDK 16 on a RPi 3B and I downloaded the Linux ARM 64 Compressed Archive from the Oracle site. Every time I run the command to check the version of java I get the same error: bash: ./java: cannot execute binary file: Exec format error

            I already tried to untar it again and download the archive from zero, but I get the same error every time. Considering the RPi 3B not able to support the JDK16 for some reason, I downloaded and installed the Kit on a RPi 4 too, but the result is always the same. I used the checksum to make sure the downloaded archive was intact and it was.

            Am I downloading the wrong package or have I missed anything important?



            Answered 2021-Jun-10 at 15:45

            It seems you are running a 32 bit ARM Linux (armv7l), you therefore cannot execute a 64 bit aarch64 JDK. You need to install the 32 bit version, the same way you installed the 64 bit JDK, or to install a 64 bit Linux distribution on your system.

            Source https://stackoverflow.com/questions/67923755


            extern "C" extern variable in C++ program sought as a class variable.. how to declare it?
            Asked 2021-Jun-10 at 13:05

            I have a code below. It is part of a dynamic shared library which is loaded by qemu program (a C program) using dlopen.



            Answered 2021-Jun-08 at 10:15

            The extern "C" makes no difference when declaring variables, it matters only for functions. The reason is that functions in C++ can be overlapped but variables can't.

            for example:

            Source https://stackoverflow.com/questions/67884953


            Some questions about ELF file format
            Asked 2021-Jun-09 at 11:15

            I am trying to learn how ELF files are structured and probably how to make one manually.

            I am working on aarch64 Linux OS, the ELF files I am inspecting are of elf64-littleaarch64 format.

            Also I try to learn by myself, however I got stuck with some questions...

            1. When I do xxd code, the first number in each line of the output specifies the address of bytes in the file. But when objdump -D code, the first number is something like 4000b0, however corresponds to 000000b0 in xxd. Why is there a four at the beginning?
            2. In objdump, the bytecode is for example 11000a94, which 'means' add w20, w20, #2 in assembly. I know, that 11 is the opcode, but what does 000a94 mean? I thought, it should be the parameters, but I am adding the value 2 and can't find the number 2 in it.

            If you have a good article to read, or can help me explain this, I will be very grateful!



            Answered 2021-Jun-09 at 11:15

            Well, I was too fast asking this question, but now, I will answer it too.

            1. 40 at the beginning of the addresses in objdump is the hex representation of the char "@", which means "at" and points to an address, very simple!
            2. Little Endian has CPU addresses stored in 5 bits instead of 6 or 8. That means, that I should look for the binary value of the objdump code: 11000a94 --> 10001000000000000101010010100, where it can be divided into [10001][00000000000010][10100][10100] with [opcode][value][first address][second address]

            Both answers are wrong, see the accepted answer. I will still let them here, though

            Source https://stackoverflow.com/questions/67351021


            C++ Custom Exception classes
            Asked 2021-Jun-07 at 15:46

            i am making a program and decided to make my own exceptions so i wrote the following header-only file:



            Answered 2021-Jun-07 at 14:46

            Have you tried catching std::exception instead of the exception class?

            Like this:

            Source https://stackoverflow.com/questions/67873720


            After running a project in Qt Debug build, the binary (exe) disappears and object files are shrunk. How to fix that?
            Asked 2021-Jun-05 at 05:32

            My Qt Creator is 4.11 which is based on Qt 5.14 in Ubuntu 17.04. Due to ongoing development, I have not updated Qt Creator and Ubuntu to avoid disturbing the working setup.

            Whenever I run it in Debug build mode, it compiles fine and runs the executable. But then if I check the "build--*" directory, the binary file (viz. .exe) disappears and all the .o file created from .cpp files shrink to 18 bytes from few MBs!!

            Have searched online, but couldn't find such unique problem. Currently the workaround is to clean-build every time, with painful long wait.

            Kindly suggest which configuration will fix this issue?


            With some help from the comment section, another distinguishing detail has surfaced. When I visit the build-* folder for a good project & this project and check file main.o in terminal then following output comes

            good project: _main.o: ELF 64-bit LSB relocatable, x86-64, version 1 (GNU/Linux), not stripped

            bad (this) project:_main.o: gzip compressed data, from NTFS filesystem (NT)



            Answered 2021-Jun-05 at 05:32

            This issue is not related to Qt, but related to our own code. We have a module which Gzips all files in a given directory recursively.

            However, if the directory path is empty, then original binary's path is taken as a zipping directory. Hence all the object files were zipped and somehow the binary file itself was disappearing.

            I have put a necessary check and now this will be avoided.

            Thanks to user @G.M. who asked me in the comments section to run command file . From that I got the hint that instead of below output:

            ELF 64-bit LSB relocatable, x86-64, version 1

            it was giving gzip output:

            gzip compressed data, from NTFS filesystem (NT)

            This led me to believe that there has to be something with our recently added Gzip mechanism.

            Source https://stackoverflow.com/questions/67805199

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install ELF

            You can download it from GitHub.


            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • HTTPS


          • CLI

            gh repo clone facebookresearch/ELF

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Reinforcement Learning Libraries

            Try Top Libraries by facebookresearch


            by facebookresearchJupyter Notebook


            by facebookresearchPython


            by facebookresearchPython


            by facebookresearchPython


            by facebookresearchHTML