Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8262019

jextract crashes with clang overridable function extension

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: repo-panama
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      jextract crashes with libclang-common-3.9-dev's tgmath.h

      $ jextract -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include tgmath.h


      In memory compilation failed: warning: using incubating module(s): jdk.incubator.foreign
      tgmath_h.java:4832: error: method __tg_promote$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_promote$MH() {
                                     ^
      tgmath_h.java:4885: error: method __tg_promote$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_promote$MH() {
                                     ^
      tgmath_h.java:4888: error: method __tg_promote(int) is already defined in class tgmath_h
          public static double __tg_promote ( int x0) {
                               ^
      tgmath_h.java:4896: error: method __tg_promote$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_promote$MH() {
                                     ^
      tgmath_h.java:4907: error: method __tg_promote$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_promote$MH() {
                                     ^
      tgmath_h.java:4910: error: method __tg_promote(long) is already defined in class tgmath_h
          public static double __tg_promote ( long x0) {
                               ^
      tgmath_h.java:4918: error: method __tg_promote$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_promote$MH() {
                                     ^
      tgmath_h.java:4921: error: method __tg_promote(long) is already defined in class tgmath_h
          public static double __tg_promote ( long x0) {
                               ^
      tgmath_h.java:4929: error: method __tg_promote$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_promote$MH() {
                                     ^
      tgmath_h.java:4932: error: method __tg_promote(long) is already defined in class tgmath_h
          public static double __tg_promote ( long x0) {
                               ^
      tgmath_h.java:4940: error: method __tg_promote$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_promote$MH() {
                                     ^
      tgmath_h.java:4963: error: method __tg_promote$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_promote$MH() {
                                     ^
      tgmath_h.java:4974: error: method __tg_promote$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_promote$MH() {
                                     ^
      tgmath_h.java:4977: error: method __tg_promote(float) is already defined in class tgmath_h
          public static float __tg_promote ( float x0) {
                              ^
      tgmath_h.java:4985: error: method __tg_promote$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_promote$MH() {
                                     ^
      tgmath_h.java:4988: error: method __tg_promote(double) is already defined in class tgmath_h
          public static double __tg_promote ( double x0) {
                               ^
      tgmath_h.java:5007: error: method __tg_acos$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_acos$MH() {
                                     ^
      tgmath_h.java:5018: error: method __tg_acos$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_acos$MH() {
                                     ^
      tgmath_h.java:5021: error: method __tg_acos(float) is already defined in class tgmath_h
          public static float __tg_acos ( float __x) {
                              ^
      tgmath_h.java:5049: error: method __tg_acos$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_acos$MH() {
                                     ^
      tgmath_h.java:5052: error: method __tg_acos(double) is already defined in class tgmath_h
          public static double __tg_acos ( double __x) {
                               ^
      tgmath_h.java:5071: error: method __tg_asin$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_asin$MH() {
                                     ^
      tgmath_h.java:5082: error: method __tg_asin$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_asin$MH() {
                                     ^
      tgmath_h.java:5085: error: method __tg_asin(float) is already defined in class tgmath_h
          public static float __tg_asin ( float __x) {
                              ^
      tgmath_h.java:5093: error: method __tg_asin$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_asin$MH() {
                                     ^
      tgmath_h.java:5096: error: method __tg_asin(double) is already defined in class tgmath_h
          public static double __tg_asin ( double __x) {
                               ^
      tgmath_h.java:5143: error: method __tg_atan$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_atan$MH() {
                                     ^
      tgmath_h.java:5154: error: method __tg_atan$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_atan$MH() {
                                     ^
      tgmath_h.java:5157: error: method __tg_atan(float) is already defined in class tgmath_h
          public static float __tg_atan ( float __x) {
                              ^
      tgmath_h.java:5165: error: method __tg_atan$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_atan$MH() {
                                     ^
      tgmath_h.java:5168: error: method __tg_atan(double) is already defined in class tgmath_h
          public static double __tg_atan ( double __x) {
                               ^
      tgmath_h.java:5187: error: method __tg_acosh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_acosh$MH() {
                                     ^
      tgmath_h.java:5198: error: method __tg_acosh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_acosh$MH() {
                                     ^
      tgmath_h.java:5201: error: method __tg_acosh(float) is already defined in class tgmath_h
          public static float __tg_acosh ( float __x) {
                              ^
      tgmath_h.java:5229: error: method __tg_acosh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_acosh$MH() {
                                     ^
      tgmath_h.java:5232: error: method __tg_acosh(double) is already defined in class tgmath_h
          public static double __tg_acosh ( double __x) {
                               ^
      tgmath_h.java:5251: error: method __tg_asinh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_asinh$MH() {
                                     ^
      tgmath_h.java:5262: error: method __tg_asinh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_asinh$MH() {
                                     ^
      tgmath_h.java:5265: error: method __tg_asinh(float) is already defined in class tgmath_h
          public static float __tg_asinh ( float __x) {
                              ^
      tgmath_h.java:5273: error: method __tg_asinh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_asinh$MH() {
                                     ^
      tgmath_h.java:5276: error: method __tg_asinh(double) is already defined in class tgmath_h
          public static double __tg_asinh ( double __x) {
                               ^
      tgmath_h.java:5323: error: method __tg_atanh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_atanh$MH() {
                                     ^
      tgmath_h.java:5334: error: method __tg_atanh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_atanh$MH() {
                                     ^
      tgmath_h.java:5337: error: method __tg_atanh(float) is already defined in class tgmath_h
          public static float __tg_atanh ( float __x) {
                              ^
      tgmath_h.java:5345: error: method __tg_atanh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_atanh$MH() {
                                     ^
      tgmath_h.java:5348: error: method __tg_atanh(double) is already defined in class tgmath_h
          public static double __tg_atanh ( double __x) {
                               ^
      tgmath_h.java:5367: error: method __tg_cos$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_cos$MH() {
                                     ^
      tgmath_h.java:5378: error: method __tg_cos$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_cos$MH() {
                                     ^
      tgmath_h.java:5381: error: method __tg_cos(float) is already defined in class tgmath_h
          public static float __tg_cos ( float __x) {
                              ^
      tgmath_h.java:5409: error: method __tg_cos$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_cos$MH() {
                                     ^
      tgmath_h.java:5412: error: method __tg_cos(double) is already defined in class tgmath_h
          public static double __tg_cos ( double __x) {
                               ^
      tgmath_h.java:5431: error: method __tg_sin$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_sin$MH() {
                                     ^
      tgmath_h.java:5442: error: method __tg_sin$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_sin$MH() {
                                     ^
      tgmath_h.java:5445: error: method __tg_sin(float) is already defined in class tgmath_h
          public static float __tg_sin ( float __x) {
                              ^
      tgmath_h.java:5453: error: method __tg_sin$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_sin$MH() {
                                     ^
      tgmath_h.java:5456: error: method __tg_sin(double) is already defined in class tgmath_h
          public static double __tg_sin ( double __x) {
                               ^
      tgmath_h.java:5503: error: method __tg_tan$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_tan$MH() {
                                     ^
      tgmath_h.java:5514: error: method __tg_tan$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_tan$MH() {
                                     ^
      tgmath_h.java:5517: error: method __tg_tan(float) is already defined in class tgmath_h
          public static float __tg_tan ( float __x) {
                              ^
      tgmath_h.java:5525: error: method __tg_tan$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_tan$MH() {
                                     ^
      tgmath_h.java:5528: error: method __tg_tan(double) is already defined in class tgmath_h
          public static double __tg_tan ( double __x) {
                               ^
      tgmath_h.java:5547: error: method __tg_cosh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_cosh$MH() {
                                     ^
      tgmath_h.java:5558: error: method __tg_cosh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_cosh$MH() {
                                     ^
      tgmath_h.java:5561: error: method __tg_cosh(float) is already defined in class tgmath_h
          public static float __tg_cosh ( float __x) {
                              ^
      tgmath_h.java:5589: error: method __tg_cosh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_cosh$MH() {
                                     ^
      tgmath_h.java:5592: error: method __tg_cosh(double) is already defined in class tgmath_h
          public static double __tg_cosh ( double __x) {
                               ^
      tgmath_h.java:5611: error: method __tg_sinh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_sinh$MH() {
                                     ^
      tgmath_h.java:5622: error: method __tg_sinh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_sinh$MH() {
                                     ^
      tgmath_h.java:5625: error: method __tg_sinh(float) is already defined in class tgmath_h
          public static float __tg_sinh ( float __x) {
                              ^
      tgmath_h.java:5633: error: method __tg_sinh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_sinh$MH() {
                                     ^
      tgmath_h.java:5636: error: method __tg_sinh(double) is already defined in class tgmath_h
          public static double __tg_sinh ( double __x) {
                               ^
      tgmath_h.java:5683: error: method __tg_tanh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_tanh$MH() {
                                     ^
      tgmath_h.java:5694: error: method __tg_tanh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_tanh$MH() {
                                     ^
      tgmath_h.java:5697: error: method __tg_tanh(float) is already defined in class tgmath_h
          public static float __tg_tanh ( float __x) {
                              ^
      tgmath_h.java:5705: error: method __tg_tanh$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_tanh$MH() {
                                     ^
      tgmath_h.java:5708: error: method __tg_tanh(double) is already defined in class tgmath_h
          public static double __tg_tanh ( double __x) {
                               ^
      tgmath_h.java:5727: error: method __tg_exp$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_exp$MH() {
                                     ^
      tgmath_h.java:5738: error: method __tg_exp$MH() is already defined in class tgmath_h
          public static MethodHandle __tg_exp$MH() {
      ....


      Reduced version of the above is as follows:

      File: x.h

      #define _TG_ATTRSp __attribute__((__overloadable__))
        
      static double _TG_ATTRSp __tg_promote(unsigned int);

      $ jextract x.h
      WARNING: Using incubator modules: jdk.incubator.jextract, jdk.incubator.foreign
      In memory compilation failed: warning: using incubating module(s): jdk.incubator.foreign
      x_h.java:23: error: method __tg_promote$MH() is already defined in class x_h
          public static MethodHandle __tg_promote$MH() {
                                     ^
      1 error
      1 warning
      static double _TG_ATTRSp __tg_promote(long);

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sundar Sundararajan Athijegannathan
              Reporter:
              sundar Sundararajan Athijegannathan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: