Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dart binary misses symbols declared in the native API #15160

Closed
DartBot opened this issue Nov 19, 2013 · 3 comments
Closed

Dart binary misses symbols declared in the native API #15160

DartBot opened this issue Nov 19, 2013 · 3 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Nov 19, 2013

This issue was originally filed by niklas...@gmail.com


While skimming through the SDK's dart_mirrors.h header I noticed that some of the symbols don't appear to be exported in the dart binary that ships with the SDK for 64-bit Linux so I decided to double check the rest of the API.

$ dart --version
Dart VM version: 1.0.0.3_r30188 (Tue Nov 12 01:15:45 2013) on "linux_x64"

SYMBOLS=$(grep EXPORT /opt/dart-sdk/include/.h | grep -o "Dart_\w(." | grep -o ".(" | cut -d "(" -f1)
EXPORTED_SYMBOLS=$(nm -D $(which dart) | grep Dart_ | awk '{print $3}')
for sym in $SYMBOLS; do
    if echo "$sym" | grep -vq "$EXPORTED_SYMBOLS"; then
        echo "Missing symbol: $sym"
    fi
done

This produces the following for me:
Missing symbol: Dart_ReportErrorHandle
Missing symbol: Dart_RethrowException
Missing symbol: Dart_TypeName
Missing symbol: Dart_QualifiedTypeName
Missing symbol: Dart_GetFunctionNames
Missing symbol: Dart_LookupFunction
Missing symbol: Dart_FunctionName
Missing symbol: Dart_FunctionOwner
Missing symbol: Dart_FunctionIsStatic
Missing symbol: Dart_FunctionIsConstructor
Missing symbol: Dart_FunctionIsGetter
Missing symbol: Dart_FunctionIsSetter
Missing symbol: Dart_LibraryName
Missing symbol: Dart_LibraryGetClassNames
Missing symbol: Dart_ClosureFunction
Missing symbol: Dart_InitPerfEventsSupport

Could someone clarify whether it's intentional or not that these symbols are not exported? If it is then they should probably be removed from the respective headers.

@sethladd
Copy link
Contributor

Added Area-VM, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Nov 20, 2013

This comment was originally written by niklas...@gmail.com


I should add that Dart_ReportErrorHandle (or rather _Dart_ReportErrorHandle) is actually available. The grep call just cut off the leading underscore due to the "-o" option. Sorry about that.

@DartBot DartBot added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. labels Nov 20, 2013
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
@rmacnak-google
Copy link
Contributor

Stale. A long time ago we fixed a bug were we used the wrong invocation of strip that didn't leave in the exported symbols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants