You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "John Lemcke (Jira)" <ji...@apache.org> on 2020/04/19 13:57:00 UTC

[jira] [Commented] (NETBEANS-2000) PIE executables not recognized as executables

    [ https://issues.apache.org/jira/browse/NETBEANS-2000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17087021#comment-17087021 ] 

John Lemcke commented on NETBEANS-2000:
---------------------------------------

I have just run into this problem using NetBeans 11.3 on Ubuntu 19.10.

A workaround that I found is to go to the Project Properties / Run and set the Run Command to point to the actual executable file instead of the default "${OUTPUT_PATH}"

 

 

> PIE executables not recognized as executables
> ---------------------------------------------
>
>                 Key: NETBEANS-2000
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2000
>             Project: NetBeans
>          Issue Type: Bug
>          Components: debugger - Code
>    Affects Versions: 9.0, 10.0
>            Reporter: Johan Persson
>            Priority: Minor
>
> All major Linux distributions now (e.g Debian, Fedora. Ubuntu, OpenSuSE) configure gcc with "{{--enable-default-pie}}" which will create Position Independent executables by default (to support DEP/ASLR)
> By default PIE executables will identify themselves on Linux as:
> {{ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked}}
> This will be reported as ELF type ET_DYN
> However Netbeans does not recognize shared objects as executables and most likely identifies them as a shared library. This means it is impossible to use the debugger with C/C++ code since you cannot select an executable to run the debugger on.
> For Netbeans to see a file as an ELF executable it must be of type
> {{ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked}}
> This will be reported as ELF type ET_EXEC
> Now, there is an easy workaround and that is to pass the options
> {{-fno-pie -no-pie}}
> to gcc when compiling (or the corresponding to say clang) to create "old-style" executables. For security reason that is of course not recommended for production code.
> Since there is a simply workaround and the fact that v10 does not yet officially support C/C++ I have marked this down as "minor" but it is a low hanging fruit to fix since it only requires identifying the code that determines file type and include shared objects as allowable executables.
> Once C/C++ once again is officially supported it is of course vital that this is fixed.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists