| name | fix-leak |
|---|---|
| description | Fix a memory leak flagged by NO_DETECT_LEAK in an LFortran integration test. Investigates whether the leak is a user-level Fortran pointer leak or a compiler-generated leak from an ASR pass. For user leaks, appends a USER_LEAK comment. For compiler leaks, fixes the source and removes the NO_DETECT_LEAK label. Triggers: fix leak, memory leak, NO_DETECT_LEAK, detect leak, leak, USER_LEAK, compiler leak. |
| import altair as alt | |
| import numpy as np | |
| import pandas as pd | |
| # Create the same data as p2-mpl.py | |
| x1 = np.linspace(0.0, 5.0) | |
| y1 = np.cos(2 * np.pi * x1) * np.exp(-x1) | |
| x2 = np.linspace(0.0, 2.0) | |
| y2 = np.cos(2 * np.pi * x2) |
In the current LFortran ASR, type-bound procedure calls with PASS semantics store the self/pass argument separately from the explicit call arguments:
SubroutineCall(name, original_name, args, dt, strict_bounds_checking)
FunctionCall(name, original_name, args, type, value, dt)
LFortran's internal array descriptor is designed to be compatible with
CFI_cdesc_t (the ISO_Fortran_binding descriptor), but it currently stores
strides in element units rather than byte units. This mismatch requires
conversion at every bind(c) boundary.
This document summarizes why switching to byte-based strides is the right move.
LFortran's array descriptor (CFI_cdesc_t) diverges from the Fortran standard
and from both GFortran and Flang in several ways. This causes ABI
incompatibility with any C code compiled against a standard-compliant
ISO_Fortran_binding.h.
LFortran will support full IEEE 754 binary128 quadruple precision (REAL(KIND=16) and COMPLEX(KIND=16)) using LLVM’s native fp128 type for all arithmetic and most operations. This provides exact binary128 semantics (15-bit exponent, 113-bit mantissa) on every target LLVM supports.
Transcendental intrinsics will be provided through an optional, thin runtime wrapper that can link to libquadmath (or the platform’s _Float128 / long-double functions when available). Basic operations, array intrinsics, and most language features will work with zero extra dependencies.
The implementation is designed to be incremental, portable, and consistent with existing LFortran infrastructure (ASR → LLVM IR lowering, runtime library, multiple backends, JIT).
| #!/usr/bin/env python3 | |
| """ | |
| Compute PR-per-person statistics from LFortran release notes. | |
| Usage: | |
| python pr_stats.py [VERSION] | |
| VERSION e.g. "0.61.0" or "v0.61.0". Omit for the latest release. | |
| Looks up each contributor's real name via the GitHub API. |
| module ring_mod | |
| ! this module isolates all of the modulo ring arithmetic associated | |
| ! with the Euler conjecture search code. | |
| implicit none | |
| private | |
| public :: ik, ring_modulo_t, jloop, kloop, lloop |
| (gfortran) ~/repos/fpm(main)$ fpm --compiler=$FC test | |
| + mkdir -p build/dependencies | |
| Initialized empty Git repository in /Users/ondrej/repos/fpm/build/dependencies/toml-f/.git/ | |
| remote: Enumerating objects: 289, done. | |
| remote: Counting objects: 100% (289/289), done. | |
| remote: Compressing objects: 100% (236/236), done. | |
| remote: Total 289 (delta 54), reused 171 (delta 20), pack-reused 0 (from 0) | |
| Receiving objects: 100% (289/289), 463.43 KiB | 2.09 MiB/s, done. | |
| Resolving deltas: 100% (54/54), done. | |
| From https://github.com/toml-f/toml-f |
| ~/repos/fpm(lf-21)$ fpm --compiler=$FC test --flag "--cpp --realloc-lhs-arrays --use-loop-variable-after-loop" | |
| Project is up to date | |
| <INFO>TEST help SUBCOMMAND STARTED | |
| <INFO>check fpm for NAME SYNOPSIS DESCRIPTION | |
| STOP | |
| <INFO>CMD=build/lfortran_B32920A010424AF1/test//../app/fpm help fpm >fpm_scratch_help.txt EXITSTAT=0 CMDSTAT=0 MESSAGE= | |
| <INFO>have completed 4 tests | |
| <INFO>check new for NAME SYNOPSIS DESCRIPTION | |
| STOP | |
| <INFO>CMD=build/lfortran_B32920A010424AF1/test//../app/fpm help new >fpm_scratch_help.txt EXITSTAT=0 CMDSTAT=0 MESSAGE= |