This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.harvey@rakuten.com
Recipients paul.harvey@rakuten.com
Date 2018-11-12.08:50:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1542012608.34.0.788709270274.issue35215@psf.upfronthosting.co.za>
In-reply-to
Content
Hi all, 

I am trying to replace the version of malloc/free...etc with my own function suit. I am have issues with loading the initial library setup. 

I am looking for wisdom from the community as to why this may be the case.

Facts:
- i just grabbed the latest cpython repo
- my memory suit seem to be working from independent testing on other code
- i am working on linux
- i went into obmalloc.c and replaced the malloc, free, realloc, calloc with my own functions. 
- i changed the mmap/unmap to use my malloc and free in obmalloc.c
- my allocated produces aligned allocations.
- i dump the exceptions text being generated to see what is happening:
EXCEPTION:: module 'sys' has no attribute '__file__'
EXCEPTION:: type object 'BuiltinImporter' has no attribute '_ORIGIN'
EXCEPTION:: module 'sys' has no attribute '__cached__'
EXCEPTION:: module 'sys' has no attribute '__path__'
EXCEPTION:: module 'builtins' has no attribute '__file__'
EXCEPTION:: type object 'BuiltinImporter' has no attribute '_ORIGIN'
EXCEPTION:: module 'builtins' has no attribute '__cached__'
EXCEPTION:: module 'builtins' has no attribute '__path__'
EXCEPTION:: module '_frozen_importlib' has no attribute '__file__'
EXCEPTION:: type object 'FrozenImporter' has no attribute '_ORIGIN'
EXCEPTION:: module '_frozen_importlib' has no attribute '__cached__'
EXCEPTION:: module '_frozen_importlib' has no attribute '__path__'
EXCEPTION:: module '_imp' has no attribute '__file__'
EXCEPTION:: type object 'BuiltinImporter' has no attribute '_ORIGIN'
EXCEPTION:: module '_imp' has no attribute '__cached__'
EXCEPTION:: module '_imp' has no attribute '__path__'
EXCEPTION:: name '_bootstrap' is not defined
EXCEPTION:: name '_bootstrap' is not defined
EXCEPTION:: name '_bootstrap' is not defined
EXCEPTION:: name '_bootstrap' is not defined
Fatal Python error: initfsencoding: failed to get the Python codec of the filesystem encoding
Traceback (most recent call last):
  File "/home/paul/fresh_cpython/debug/../Lib/encodings/__init__.py", line 31, in <module>
  File "<frozen importlib._bootstrap>", line 989, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 773, in exec_module
  File "<frozen importlib._bootstrap_external>", line 909, in get_code
  File "<frozen importlib._bootstrap_external>", line 966, in get_data
OSError: [Errno 14] Bad address
Aborted
History
Date User Action Args
2018-11-12 08:50:08paul.harvey@rakuten.comsetrecipients: + paul.harvey@rakuten.com
2018-11-12 08:50:08paul.harvey@rakuten.comsetmessageid: <1542012608.34.0.788709270274.issue35215@psf.upfronthosting.co.za>
2018-11-12 08:50:08paul.harvey@rakuten.comlinkissue35215 messages
2018-11-12 08:50:07paul.harvey@rakuten.comcreate