IntelliSense error: `First parameter of allocation function must be of type 'size_t'`
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Tái hiện chẩn đoán trong archs/i686/kernel/src/memory/vmm.cpp bằng cách sử dụng cấu hình i686-elf-g++ được báo cáo và đối số trình biên dịch -m32. Trước tiên, hãy đọc các issue liên quan #2460 và #4506, sau đó xác minh rằng cảnh báo về hàm cấp phát đã được giải quyết cho thiết lập 32-bit được cung cấp mà không đưa vào các chẩn đoán mới.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Environment
- OS and Version: Win10 22H2 19045.6466
- VS Code Version: 1.107.1
- C/C++ Extension Version: 1.29.3
- If using SSH remote, specify OS of remote machine: Kali Linux 2025.4 x86_64
Bug Summary and Steps to Reproduce
Bug Summary: Basically #2460 and #4506. It wasnt fixed. At least, not for x86 (32bit).
The workaround that was supposed to work was adding -m32 to the compiler args. Sadly, that didnt do anything.
Current code in which the intellisense errors:
void* operator new(std::size_t size) {
return Memory::VMM::g_allocator.Allocate(size);
}
void* operator new[](std::size_t size) {
return Memory::VMM::g_allocator.Allocate(size);
}
I also tried using size_t instead of std::size_t, but its the same thing; nothing changed.
Configuration and Logs
c_cpp_properties.json:
{
"configurations": [
{
"name": "OSDev",
"includePath": [
"/opt/cross/**",
"${workspaceFolder}/*",
"${workspaceFolder}/**/**",
"${workspaceFolder}/archs/**/kernel/include"
],
"defines": [
"__MULTIBOOT__",
"_DEBUG"
],
"compilerPath": "/opt/cross/bin/i686-elf-g++",
"intelliSenseMode": "linux-gcc-x86",
"compilerArgs": [
"-fno-exceptions",
"-fno-rtti",
"-std=c++2c",
"-ffreestanding",
"-nostdlib",
"-nostartfiles",
"-nodefaultlibs",
"-mno-red-zone",
"-m32"
],
"cStandard": "c23",
"cppStandard": "c++23"
}
],
"version": 4
}
C/C++ Diagnostics:
-------- Diagnostics - 12/24/2025, 4:04:03 PM
Version: 1.29.3
Current Configuration:
{
"name": "OSDev",
"includePath": [
"/opt/cross/**",
"/home/tracer/OSDev/*",
"/home/tracer/OSDev/archs/**",
"/home/tracer/OSDev/config/**",
"/home/tracer/OSDev/fonts/**",
"/home/tracer/OSDev/isodir/**",
"/home/tracer/OSDev/logs/**",
"/home/tracer/OSDev/scripts/**",
"/home/tracer/OSDev/archs/i686/**",
"/home/tracer/OSDev/config/grub/**",
"/home/tracer/OSDev/isodir/i686/**",
"/home/tracer/OSDev/archs/i686/bootloader/**",
"/home/tracer/OSDev/archs/i686/build/**",
"/home/tracer/OSDev/archs/i686/kernel/**",
"/home/tracer/OSDev/isodir/i686/boot/**",
"/home/tracer/OSDev/archs/i686/bootloader/out/**",
"/home/tracer/OSDev/archs/i686/bootloader/src/**",
"/home/tracer/OSDev/archs/i686/kernel/include/**",
"/home/tracer/OSDev/archs/i686/kernel/out/**",
"/home/tracer/OSDev/archs/i686/kernel/src/**",
"/home/tracer/OSDev/isodir/i686/boot/grub/**",
"/home/tracer/OSDev/archs/i686/kernel/out/descriptors/**",
"/home/tracer/OSDev/archs/i686/kernel/out/klibc/**",
"/home/tracer/OSDev/archs/i686/kernel/out/memory/**",
"/home/tracer/OSDev/archs/i686/kernel/include/descriptors/**",
"/home/tracer/OSDev/archs/i686/kernel/include/grub/**",
"/home/tracer/OSDev/archs/i686/kernel/include/harddisk/**",
"/home/tracer/OSDev/archs/i686/kernel/include/klibc/**",
"/home/tracer/OSDev/archs/i686/kernel/include/memory/**",
"/home/tracer/OSDev/archs/i686/kernel/include/video/**",
"/home/tracer/OSDev/archs/i686/kernel/src/descriptors/**",
"/home/tracer/OSDev/archs/i686/kernel/src/klibc/**",
"/home/tracer/OSDev/archs/i686/kernel/src/memory/**",
"/home/tracer/OSDev/archs/i686/kernel/include/harddisk/drivers/**",
"/home/tracer/OSDev/archs/i686/kernel/include"
],
"defines": [
"__MULTIBOOT__",
"_DEBUG"
],
"compilerPath": "/opt/cross/bin/i686-elf-g++",
"intelliSenseMode": "linux-gcc-x86",
"compilerArgs": [
"-fno-exceptions",
"-fno-rtti",
"-std=c++2c",
"-ffreestanding",
"-nostdlib",
"-nostartfiles",
"-nodefaultlibs",
"-mno-red-zone",
"-m32"
],
"cStandard": "c23",
"cppStandard": "c++23",
"compilerPathIsExplicit": true,
"cStandardIsExplicit": true,
"cppStandardIsExplicit": true,
"intelliSenseModeIsExplicit": true,
"recursiveIncludesReduceIsExplicit": false,
"recursiveIncludesPriorityIsExplicit": false,
"recursiveIncludesOrderIsExplicit": false,
"compilerPathInCppPropertiesJson": "/opt/cross/bin/i686-elf-g++",
"mergeConfigurations": false,
"recursiveIncludes": {},
"browse": {
"limitSymbolsToIncludedHeaders": true
}
}
Modified Settings:
{
"C_Cpp.default.intelliSenseMode": "gcc-x86",
"C_Cpp.default.compilerPath": "/opt/cross/bin/i686-elf-g++",
"C_Cpp.default.cStandard": "c23",
"C_Cpp.default.cppStandard": "c++23",
"C_Cpp.default.customConfigurationVariables": {},
"C_Cpp.loggingLevel": "Debug"
}
Additional Tracked Settings:
{
"editorTabSize": 4,
"editorInsertSpaces": true,
"editorAutoClosingBrackets": "languageDefined",
"filesEncoding": "utf8",
"filesAssociations": {
"*.css": "tailwindcss"
},
"filesExclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/Thumbs.db": true
},
"filesAutoSaveAfterDelay": false,
"editorInlayHintsEnabled": false,
"editorParameterHintsEnabled": true,
"searchExclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true
},
"workbenchSettingsEditor": "ui"
}
cpptools version (native): 1.29.2.0
Current database path: /home/tracer/.cache/vscode-cpptools/957e046abb2e24884e6a191f8ce7f5c7/.browse.VC.db
Translation Unit Mappings:
[ /home/tracer/OSDev/archs/i686/kernel/src/memory/vmm.cpp - source TU]:
Translation Unit Configurations:
[ /home/tracer/OSDev/archs/i686/kernel/src/memory/vmm.cpp ]
Process ID: 517
Memory Usage: 33 MB
Compiler Path: /opt/cross/bin/i686-elf-g++
Include paths:
include: /home/tracer/OSDev
include: /home/tracer/OSDev/archs/i686/kernel/include
system include: /opt/cross/i686-elf/include/c++/15.1.0
system include: /opt/cross/i686-elf/include/c++/15.1.0/i686-elf
system include: /opt/cross/i686-elf/include/c++/15.1.0/backward
system include: /opt/cross/lib/gcc/i686-elf/15.1.0/include
system include: /opt/cross/lib/gcc/i686-elf/15.1.0/include-fixed
system include: /opt/cross/i686-elf/include
Defines:
__MULTIBOOT__
_DEBUG
Standard Version: c++26
IntelliSense Mode: linux-gcc-x86
Other Flags:
--g++
--gnu_version=150100
Total Memory Usage: 33 MB
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 1329
Number of files parsed: 110
Full C/C++ logs: https://pastebin.com/WQ93WH89
Other Extensions
No response
Additional context
Related to:
- Ngôn ngữ chính
- TypeScript
- Star
- 6.2k
- Fork
- 1.7k
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 58
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/vscode-cpptools
-
bug Language Service regression
microsoft/vscode-cpptools#14795 · 1 bình luận · 1 người được giao ·
-
bug Language Service parser
microsoft/vscode-cpptools#14794 · 1 bình luận · 1 người được giao ·
-
more info needed
microsoft/vscode-cpptools#14793 · 2 bình luận · 1 người được giao ·
-
more info needed
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/vscode-cpptools#14787 · 1 bình luận · 1 người được giao ·
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared libraries Đang mởbug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 1 bình luận · 1 người được giao ·
Tất cả issue của microsoft/vscode-cpptools
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
TanStack/tanstack.com#1293 ·