Sha256: af6d9b7f6ca0d308a0d51dd82a931db32b2e8038eb0e5858cd9fd9d49c0be734

Contents?: true

Size: 786 Bytes

Versions: 1569

Compression:

Stored size: 786 Bytes

Contents

/* Area:	bpo-38748
   Purpose:	test for stdcall alignment problem
   Source:      github.com/python/cpython/pull/26204 */

/* { dg-do run } */

#include "ffitest.h"
#include "ffi_common.h"

static UINT32 ABI_ATTR align_arguments(UINT32 l1,
				       UINT64 l2)
{
  return l1 + (UINT32) l2;
}

int main(void)
{
  ffi_cif cif;
  ffi_type *args[4] = {
    &ffi_type_uint32,
    &ffi_type_uint64
  };
  ffi_arg lr1, lr2;
  UINT32 l1 = 1;
  UINT64 l2 = 2;
  void *values[2] = {&l1, &l2};

  /* Initialize the cif */
  CHECK(ffi_prep_cif(&cif, ABI_NUM, 2,
		     &ffi_type_uint32, args) == FFI_OK);

  lr1 = align_arguments(l1, l2);

  ffi_call(&cif, FFI_FN(align_arguments), &lr2, values);

  if (lr1 == lr2)
    printf("bpo-38748 arguments tests ok!\n");
  else
    CHECK(0);
  exit(0);
}

Version data entries

1,569 entries across 1,569 versions & 15 rubygems

Version Path
affixapi-1.1.94 vendor/bundle/ruby/3.3.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
affixapi-1.1.93 vendor/bundle/ruby/3.3.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
ory-client-1.14.5 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.0/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
mux_ruby-3.18.0 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
ory-client-1.14.4 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.0/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
affixapi-1.1.92 vendor/bundle/ruby/3.3.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
affixapi-1.1.91 vendor/bundle/ruby/3.3.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
ory-client-1.14.3 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.0/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
ory-client-1.14.2 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.0/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
affixapi-1.1.90 vendor/bundle/ruby/3.3.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
ory-kratos-client-1.2.1 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.0/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
ory-client-1.14.1 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.0/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
ory-client-1.14.0 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.0/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
affixapi-1.1.89 vendor/bundle/ruby/3.3.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
ory-hydra-client-2.2.1 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.0/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
ory-oathkeeper-client-0.40.8 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.0/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
ory-client-1.13.10 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.0/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
ory-client-1.13.6 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.0/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
ory-client-1.13.4 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.0/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
ory-client-1.13.3 vendor/bundle/ruby/3.1.0/gems/ffi-1.17.0/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c