ish-app / ish-app/ish

File provider crash trying to open a file in a NULL mount

Open
#979 4 comments 0 reactions 0 assignees View on GitHub
crash no repro
Dominant language
C
Stars
20.5k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

```
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000000000c0
VM Region Info: 0xc0 is not in any region. Bytes before following region: 4333354816
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 10249c000-1024b8000 [ 112K] r-x/r-x SM=COW ...HFileProvider

Thread 2 name:
Thread 2 Crashed:
0 libsystem_pthread.dylib 0x00000001f390189c _pthread_mutex_fairshare_unlock + 128 (pthread_mutex.c:1031)
1 iSHFileProvider 0x00000001024a7480 __lock + 8 (sync.h:44)
2 iSHFileProvider 0x00000001024a7480 db_begin + 28 (fake.c:56)
3 iSHFileProvider 0x00000001024a7900 fakefs_open_inode + 36 (fake.c:191)
4 iSHFileProvider 0x00000001024a4b18 -[FileProviderItem openNewFDWithError:] + 176 (FileProviderItem.m:49)
5 iSHFileProvider 0x00000001024a49c8 -[FileProviderItem initWithIdentifier:mount:error:] + 124 (FileProviderItem.m:33)
6 iSHFileProvider 0x00000001024a2378 -[FileProviderExtension itemForIdentifier:error:] + 120 (FileProviderExtension.m:68)
7 iSHFileProvider 0x00000001024a4374 -[FileProviderExtension enumeratorForContainerItemIdentifier:error:] + 24 (FileProviderExtension.m:363)
8 FileProvider 0x00000001c21c3e98 -[FPXSpotlightIndexer _indexOneBatchWithCompletionHandler:] + 280 (FPXSpotlightIndexer.m:146)
9 libdispatch.dylib 0x00000001adc5d298 _dispatch_call_block_and_release + 24 (init.c:1454)
10 libdispatch.dylib 0x00000001adc5e280 _dispatch_client_callout + 16 (object.m:559)
11 libdispatch.dylib 0x00000001adc08d2c _dispatch_workloop_invoke$VARIANT$mp + 1916 (inline_internal.h:2548)
12 libdispatch.dylib 0x00000001adc11518 _dispatch_workloop_worker_thread + 712 (queue.c:6590)
13 libsystem_pthread.dylib 0x00000001f39085a4 _pthread_wqthread + 272 (pthread.c:2193)
14 libsystem_pthread.dylib 0x00000001f390b874 start_wqthread + 8
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the crash path in fake.c at db_begin and fakefs_open_inode, then inspect FileProviderItem.m and FileProviderExtension.m at the listed methods. Reproduce the file-open or Spotlight indexing path for a NULL mount and verify that it no longer crashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, ios, objective-c
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.