[
https://issues.apache.org/jira/browse/NETBEANS-2000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Johan Persson updated NETBEANS-2000:
------------------------------------
Description:
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.
was:
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}}
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}}
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.
> 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
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists