Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

malloc crash “randomly” #78

Closed
Closed
@rastersize

Description

@rastersize

Hey!

When trying to generate docs for the libraries in an app I’m working on I keep running into malloc crashes. This happens for different libraries for different runs. Both when using the markdown and HTML formats.

Basically I run this command for a number of modules:

swift doc generate \
  --output Libraries/$module_name \
  --module-name $module_name \
  --output artifacts/docs/API/$module_name \
  [--format html]

The errors I see are:

swift-doc(44797,0x70000879f000) malloc: Double free of object 0x7ff8b6d11c00
swift-doc(44797,0x70000879f000) malloc: *** set a breakpoint in malloc_error_break to debug
swift-doc(50645,0x700003d39000) malloc: *** error for object 0x7ff087124ba0: pointer being freed was not allocated
swift-doc(50645,0x700003d39000) malloc: *** set a breakpoint in malloc_error_break to debug

For now I’ve worked around it by retrying the swift doc operation on failures. Which seems to generate all docs.


Side note, I tried to build the project in Xcode to help debug the issue. Unfortunately Xcode (11.4 (11E146)) fails to build with an error:

Swift Compiler Error Group
/Applications/Xcode-1140.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/libxml2/libxml/module.modulemap:1:8: Redefinition of module 'libxml2'
/Users/.../swift-doc/.build/checkouts/Markup/Modules/module.modulemap:1:8: Previously defined here

I can file a separate issue for this if you want?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions